Projectile object (starter.fps )
by Gagan · in Torque Game Engine · 01/06/2010 (3:01 pm) · 1 replies
Hi,
I am newbie , trying to play with starter.fps and want to do some modification in projectile object.I have lower the muzzleVelocity in crossbow.cs , so i can see the projectile object after firing(firing and collision ) .
I tried to do something with the projectile object as following
1) Want to move my camera with projectile object (the focus point of camera should be the projectile object after firing till it collied )
2) While moving projectile object in game world ,I want it to rotate with some rotational velocity about their on axis.
3) after collision projectile object get disappeared in the game but i want that it remain as in game world .
I have trying to edit the code of starter.fps (crossbow.cs)to do above three thing but i am not getting what and how should i do edit the code, can u please tell me how i do ??
I am newbie , trying to play with starter.fps and want to do some modification in projectile object.I have lower the muzzleVelocity in crossbow.cs , so i can see the projectile object after firing(firing and collision ) .
I tried to do something with the projectile object as following
1) Want to move my camera with projectile object (the focus point of camera should be the projectile object after firing till it collied )
2) While moving projectile object in game world ,I want it to rotate with some rotational velocity about their on axis.
3) after collision projectile object get disappeared in the game but i want that it remain as in game world .
I have trying to edit the code of starter.fps (crossbow.cs)to do above three thing but i am not getting what and how should i do edit the code, can u please tell me how i do ??
Torque Owner Daniel Buckmaster
T3D Steering Committee
One of the advanced camera resources might be able to help you, as long as their 'tracking' modes work on GameBase objects, not just ShapeBase ones.
In Projectile::interpolateTick, you can see where the projectile is oriented towards its velocity for rendering. You'd have to add some sort of time-based (or speed-based) roll, instead of just using the velocity every frame.
There's a resource here for 'fluid' projectiles which do something similar to that.
EDIT: Oh actually, I think ballistic projectiles aren't removed upon collision, so have a go at setting isBallistic = true.