Total noob, Please help
by Greg Taylor · in General Discussion · 06/07/2012 (3:28 pm) · 2 replies
Hi everyone,
Ive been trying out the demo and working through the documentation and got to the tutorials. Now i started with the miniplatformer as it looked the most interesting and the one that would be closest to the games that i plan to build...
...however...
i was told, in order to cancel the double jump, ammend the jump function with this:
function playerJump()
{
%yVelocity = $pGuy.getLinearVelocityY();
%xVelocity = $pGuy.getLinearVelocityX();
$pGuy.setLinearVelocityY(100);
$pGuy.setLinearVelocityX(0);
%collision = $pGuy.castCollision(0.005);
if(!(%collision $= ""))
{
$pGuy.setLinearVelocityY(-225);
}
else
{
$pGuy.setLinearVelocityY(%yVelocity);
}
$pGuy.setLinearVelocityX(%xVelocity);
}
and now it wont jump at all ???
Most of this has been copy and pasting but im starting to understand more, the more i do, but i have repeated this tutorial so many times and cannot get it to behave right, can anyone please help ?
I am planning on buying the full engine soon but this is holding me back as i cant move forward.
Thanks in advance.
Greg
Ive been trying out the demo and working through the documentation and got to the tutorials. Now i started with the miniplatformer as it looked the most interesting and the one that would be closest to the games that i plan to build...
...however...
i was told, in order to cancel the double jump, ammend the jump function with this:
function playerJump()
{
%yVelocity = $pGuy.getLinearVelocityY();
%xVelocity = $pGuy.getLinearVelocityX();
$pGuy.setLinearVelocityY(100);
$pGuy.setLinearVelocityX(0);
%collision = $pGuy.castCollision(0.005);
if(!(%collision $= ""))
{
$pGuy.setLinearVelocityY(-225);
}
else
{
$pGuy.setLinearVelocityY(%yVelocity);
}
$pGuy.setLinearVelocityX(%xVelocity);
}
and now it wont jump at all ???
Most of this has been copy and pasting but im starting to understand more, the more i do, but i have repeated this tutorial so many times and cannot get it to behave right, can anyone please help ?
I am planning on buying the full engine soon but this is holding me back as i cant move forward.
Thanks in advance.
Greg
Torque 3D Owner Ronny Bangsund
Torque Cheerleaders