New to torque x and have a question
by Ian Roach · in Torque X 2D · 12/08/2007 (2:16 am) · 1 replies
Hi everyone, fairly new to torque x but i had a few questions
1) been looking at the sample tutorials which are excellent, but im still wondering if you can have multiple layers and move between them ? for example have 30 different layers all overlayed (i know tis is possible by assigning the layer number), but can the player move between layers , so enemies on the background layer dont hurt me on my current layer and so on ? even having enemies not on my current layer be slightly blurred?
2) I know its possible to mount objects to one another, but will this also take into account its physics, for example making a snake like shape, the head is all linked to its skeleton, but if i turn the physics will make the whole body turn one after the other (think of the way a snake movies)
thanks in advance
1) been looking at the sample tutorials which are excellent, but im still wondering if you can have multiple layers and move between them ? for example have 30 different layers all overlayed (i know tis is possible by assigning the layer number), but can the player move between layers , so enemies on the background layer dont hurt me on my current layer and so on ? even having enemies not on my current layer be slightly blurred?
2) I know its possible to mount objects to one another, but will this also take into account its physics, for example making a snake like shape, the head is all linked to its skeleton, but if i turn the physics will make the whole body turn one after the other (think of the way a snake movies)
thanks in advance
About the author
Associate John Kanalakis
EnvyGames
1. Collisions are not set per layer, but you can code this. For example, you can always chage the Layer property of a scene object. So if a player 'goes upstairs', then you can set MyPlayer.Layer += 1; Then, your collision delegate method (event handler) can check the layer, for example:
if( ourObject.Layer == theirObject.Layer )
//process the collision
2. I'm not sure if this will work the way you are hoping, but you can give it a try. You can set some properties to the Mount that might help, try some of these.
//ignore the rotation
_mounterObject.TrackMountRotation = false;
//add a delay to the mounted movement
_mounterObject.UseMountForce = true;
_mounterObject.MountForce = 2.0F;
Hope that points you in the right direction.
John K.