|
Post by TinSoldier on Jan 10, 2016 8:59:50 GMT
In my tank project i have 5 ammo shell rigidbodies.
The ammo can collide with other rigidbodies and some have attached skinmeshs with frame animation.
Is there a way to identify which rigidbody the ammo collided with so i can change the attached skinmesh's animation frame ? .
In this case the animation has only 2 frames and the second frame (001_mesh.x) is only shown for a split second then returned to the first frame (000_mesh.x) triggered by the collision/explosion. It seems like this should be easy, but i cant seem to figure it out, any ideas.
also the ID of the ammo won't be of help, i need to identify which object the ammo collided with and it could be any of the 5 ammo shells with any other rigidbody..
|
|
|
Post by indiedev on Jan 24, 2016 8:27:57 GMT
linking the 'event on contact' to the objects/mesh should do it?
|
|
|
Post by TinSoldier on Feb 4, 2016 7:22:32 GMT
indiedev i don't think the eventoncontact returns element ids .. I've decided on a project/tank design change ... Originally i was going to use a fixed tank body & turret meaning to fire and hit an opponent would be quite hard, even more so if the tank was moving.. Because my tanks are quite speedy, i've decided to go with a traditional rotating turret and cannon.. This also allows aim at and hitting targets above eye level, its a break from the BattleZone theme i was aiming for, but that was very crude anyway, so i'm fine with the change's.. Also killing your opponent will be easier too.. It's a work in progress.. Thanks for the reply
|
|
|
Post by indiedev on Feb 6, 2016 3:42:11 GMT
since only 2 frames, u can ditch the animation totally using skinmesh 000 as default mesh, then:
event on contact-link missile to tank=start event timer for split sec to hide mesh000/show mesh001/
that or similar should work unless you need IDs for some reason
|
|
|
Post by TinSoldier on Feb 8, 2016 17:38:37 GMT
this problem is closed.. I wont be using element ID's for this anymore..
|
|