Game Development Community

Eye Offset// weapon goes through walls

by Matthew Jones · in Torque Game Engine · 07/21/2002 (9:26 pm) · 5 replies

I read a post that discussed this but didn't go into how to solve the problem. I noticed that in the version of realm wars that I have, the crossbow does the same thing. Is there a way around this through scripting or is this deeper in the engine? If there is any reference you could point me to please do.
Thanks
Matt

#1
07/21/2002 (9:41 pm)
In tribes 1 and 2 the weapon came back. Can we just set it to move back(on detection of something is there from bounding box)? or animations needed?
#2
07/21/2002 (11:36 pm)
I think youll find the crossbow doesnt have a collision box and that is the reason it goes through walls.

When i look in the console i always see an error regarding col-0 not found or sumsuch.

So is that the problem ?
#3
07/22/2002 (4:56 am)
Weapons do need a collision mesh or box so they don't "stick" through the walls. Once that is added the weapon is pushed back from the wall if the player is too close.
#4
07/22/2002 (7:29 am)
Nope thats not it. I have all that in the model and it doesn't prevent the model from going through the wall. Thats why I was hoping to get an answer here because I thought maybe the code might have somthing to do with it. Maybe? Does the "collision-0" have a reference in the code. How does the engine define it and where? Just a shot in the dark.

Thanks
Matt
#5
07/22/2002 (11:32 am)
Maybe you can use the onCollision method of the weapon (considering you have a col box) and change the mount offset when it collides .... not sure... maybe there's an easier way, got no idea.