GUN COLLISION

A forum to store posts deemed exceptionally wise and useful
Post Reply
Game_Manic

GUN COLLISION

Post by Game_Manic »

I was trying to get my gun to not go through walls and enemies etc.(basicly collision)(Ooo... a ghost weapon :shock: ) my camera won't go through stuff, I added a collisionResponoranimator to the gun as well the camera, maybe I made the ellipsoidRadius wrong for the weapon :?:
oh yeah, if this helps explain i set the scale for my gun(1,1,1).
BlackNinjaGames
Posts: 31
Joined: Mon Sep 05, 2005 4:47 pm
Contact:

Post by BlackNinjaGames »

Well assuming this is a first person shooter, why don't you just increase the ellipsoidRadius until it also includes the gun?
Game_Manic

Post by Game_Manic »

I tried that, but it didn't seem to work, :idea: maybe I need to make a triangleselector for the gun so then the collision might work :?:
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Post by etcaptor »

Triangle selector for gun will not help you. Collision response animator does not work for child nodes :( . Tthe only one way is increasing of ellipsoidRadius, but I don't like this method.
You can also improve collision response animator for yourself or use some phisycs engine.
ImageImage
Site development -Rock and metal online
--- etcaptor.com ------freenetlife.com
omaremad
Competition winner
Posts: 1027
Joined: Fri Jul 15, 2005 11:30 pm
Location: Cairo,Egypt

Post by omaremad »

May be add a triselector and animator to the gun but make the gun have the same matrix as the camera?(but not child)

kinda like attaching guns to bones
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Post by etcaptor »

@omaremad, this things hearts me at this moment. I trying to modify collision response animator. Let suppose that is not very hard to stop moving of parent when any child node collide. But when parent rotate, child nodes will pass trough the walls, because this animator is not sense to rotation. If suppose that there are any issue, another problem appears - stop animation child-parent, because when child node collide, animation for this node and for it’s parent must be stopped at current frame.
Do you meant Achi's implementation of bones? Because joinst are child nodes too.
ImageImage
Site development -Rock and metal online
--- etcaptor.com ------freenetlife.com
omaremad
Competition winner
Posts: 1027
Joined: Fri Jul 15, 2005 11:30 pm
Location: Cairo,Egypt

Post by omaremad »

i was talking about how you attach guns to .x mesh bones in normal irrlicht
Th3one
Posts: 17
Joined: Fri Nov 25, 2005 11:43 am

Post by Th3one »

yeah i'm having the same problem...my gun keeps disappearing into the map :( having a huge collision area on the camera isnt really an option...any ideas guys?
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Post by etcaptor »

Most peoples here will say to use any external phisycs or collision engine.
Another way is improving of collision response animator for childs collision. You must use absolute positions in this case. Many peoples says that irrlicht collision is slow... I found that it is not slow, but in some cases you can get slow fps. For me newton collision is slow for small objects. Irrlicht collision have not any problems for small objects by me.
ImageImage
Site development -Rock and metal online
--- etcaptor.com ------freenetlife.com
Th3one
Posts: 17
Joined: Fri Nov 25, 2005 11:43 am

Post by Th3one »

okies...well looking at it I'll most likely have to go down the physics engine route. Can anyone recommend a decent phyics engine that will do what i want and work well with irrlicht?
Post Reply