Jump pads : DTS or DIF ?
by Browser_ice · in Torque Game Engine · 11/04/2007 (10:57 am) · 8 replies
I had started creating a jump pad in 3d max but when I exported it, I would walk through it as if the collision wasn't there at all and the lighting was done as if it was done against the invisible bounds box.
So I started to wonder if this sort of object should be done in DIF instead.
So I started to wonder if this sort of object should be done in DIF instead.
#2
11/04/2007 (12:07 pm)
And yes it needs to be a dts make sure it doesnt come up in your static shapes
#3
11/04/2007 (1:08 pm)
Thx but I do not think this addresses the cliping and lighting issues I have with my DTS.
#4
11/05/2007 (9:26 am)
Make sure your collision mesh is labeled correctly. Also make sure it is as close to the shape of the model as necessary as it determines the lighting. Maybe multiple meshes would be better for the model.
#5
11/06/2007 (2:20 am)
And try to make sure the collision mesh is nice and basic, if you need to get complicated with it you should use two.
#6
I'll try to attach my file once I get home so you guys can have a look at it.
11/07/2007 (12:42 pm)
The shape is extreamly simple. Its like a box who's corners have been stretched a bit. The collision is a copy of that same mesh. Looking at the shadow produced after a full relight, it indicates that is projected from a box which is bigger then the bounds box. I'll try to attach my file once I get home so you guys can have a look at it.
#7
Is there a bug that can cause it to be walkthrough ?
Anyhow, I won't assume it is fixed. It may come back.
11/08/2007 (2:31 pm)
Hummm, for some reasons, I do not know why, its working now. I didn't change anything. I simply tried another to add my DTS into my mission and now when I walk up to it, its not walkthrough anymore.Is there a bug that can cause it to be walkthrough ?
Anyhow, I won't assume it is fixed. It may come back.
#8
That way you could simply drop your jump pad anywhere, move your your trigger to where you want the player to land and that's it. Otherwise, if you want to have the player jumped to a specific location, it is alot of trials to get it right.
11/25/2007 (12:43 am)
Is it possible to create a code to have the player projected toward a specific target ?That way you could simply drop your jump pad anywhere, move your your trigger to where you want the player to land and that's it. Otherwise, if you want to have the player jumped to a specific location, it is alot of trials to get it right.
Torque Owner Wade Lawrence
datablock TriggerData(ramp)
{
tickPeriodMS = 100;
};
//--------------------------------------------------------------
// Events
//--------------------------------------------------------------
function ramp::onEnterTrigger(%this,%trigger,%obj)
{
// This method is called whenever an object enters the %trigger
// area, the object is passed as %obj. The default onEnterTrigger
// method (in the C++ code) invokes the ::onTrigger(%trigger,1) method on
// every object (whatever it's type) in the same group as the trigger.
Parent::onEnterTrigger( %this, %trigger, %obj );
// dynamic field: power = 5
if (%trigger.power)
%power = %trigger.power;
else
%power = 5;
ServerPlay3D(Pain,%obj.getWorldBoxCenter());
%obj.applyImpulse(%obj.getWorldBoxCenter(),vectorScale(%obj.getEyeVector(), %power * 10000));
}