Animation Sphere
by Chelaru Catalin Ionut · in Torque 3D Beginner · 11/13/2014 (1:37 am) · 13 replies
Hello i want to make sphere that moves like the ones from this game : http://store.steampowered.com/app/291430/ .
Could you please help me?
Thank you
Could you please help me?
Thank you
#2
11/13/2014 (12:36 pm)
Thank you. I will try it. When is the new integration of PhysX will be build in T3D?
#3
I want the player to be the sphere.
I made player datablock and assigned the sphere to it.
I changed the camera.
But I don't know what to do to apply the rigid-body datablock to my sphere.
11/13/2014 (11:49 pm)
Hello. This is what I want to do.I want the player to be the sphere.
I made player datablock and assigned the sphere to it.
I changed the camera.
But I don't know what to do to apply the rigid-body datablock to my sphere.
#4
And as for creating a sphere as a rigidshape object -
In the Object Editor, open the library. Select the Scripted tab and open the RigidShape folder. Double-click BouncingBoulder to create a RigidShape of that particular type.
To set up your own type:
11/14/2014 (7:14 am)
You want the player to be a sphere? Not control a sphere?And as for creating a sphere as a rigidshape object -
In the Object Editor, open the library. Select the Scripted tab and open the RigidShape folder. Double-click BouncingBoulder to create a RigidShape of that particular type.
To set up your own type:
// of course, replace "myball" stuff with your stuff....
datablock RigidShapeData( MyBall )
{
category = "MyBallShape";
shapeFile = "art/shapes/myball/myballmodel.dae";
emap = true;
// Rigid Body
mass = 50;
massCenter = "0 0 0"; // Center of mass for rigid body
massBox = "0 0 0"; // Size of box used for moment of inertia,
// if zero it defaults to object bounding box
drag = 0.2; // Drag coefficient
density = "4";
bodyFriction = 0.2;
bodyRestitution = 0.25;
minImpactSpeed = 5; // Impacts over this invoke the script callback
softImpactSpeed = 5; // Play SoftImpact Sound
hardImpactSpeed = 15; // Play HardImpact Sound
integration = 4; // Physics integration: TickSec/integration
collisionTol = 0.25; // Collision distance tolerance
contactTol = 0.3; // Contact velocity tolerance
minRollSpeed = 1;
maxDrag = 0.25;
minDrag = 0.01;
triggerDustHeight = 1;
dustHeight = 10;
dragForce = 0.05;
vertFactor = 0.05;
normalForce = 0.05;
restorativeForce = 0.05;
rollForce = 0.05;
pitchForce = 0.05;
isInvincible = true;
};Then to create the ball:%obj = new RigidShape(TheBall)
{
dataBlock = "MyBall";
};
#5
I know the script that creates a rigid shape when is double clicked.
My question how do i make the ball move like the one in the video.
Now after i made the player be the ball, when i press "w" key the sphere move forward when i press "s" key it move backward, etc.
But i don't know how to make it spin like the one in the video.
%obj = new RigidShape(TheBall)
{
dataBlock = "MyBall";
};
I don't know where to put this.
From what time i spend reading the script made by other users i don't know from where to call that code.
It will be nice to tell from where to call it.
So, do you have any ideas for my question?
Thank you
11/14/2014 (10:05 am)
The player is the ball. Like in the video. I know the script that creates a rigid shape when is double clicked.
My question how do i make the ball move like the one in the video.
Now after i made the player be the ball, when i press "w" key the sphere move forward when i press "s" key it move backward, etc.
But i don't know how to make it spin like the one in the video.
%obj = new RigidShape(TheBall)
{
dataBlock = "MyBall";
};
I don't know where to put this.
From what time i spend reading the script made by other users i don't know from where to call that code.
It will be nice to tell from where to call it.
So, do you have any ideas for my question?
Thank you
#6
The difference between "being" the ball and "controlling" the ball is large - I'm not sure that you can actually "be" a player object ball correctly without non-trivial player class source modification (the player can't also be a rigidshape). It would be simpler to control the ball and make the camera follow it. To do this, you'd spawn a ball and then create keybindings to apply forces to the ball to make it move.
11/14/2014 (4:14 pm)
You'd use the creation script where you decide to create the ball. Since I have no idea what your design looks like I can't tell you where to put it.The difference between "being" the ball and "controlling" the ball is large - I'm not sure that you can actually "be" a player object ball correctly without non-trivial player class source modification (the player can't also be a rigidshape). It would be simpler to control the ball and make the camera follow it. To do this, you'd spawn a ball and then create keybindings to apply forces to the ball to make it move.
#7
This is my progress: http://postimg.org/image/sijktoo0j/ .
What are you telling me is very interesting. Could you please explain it more?
Thank you.
11/14/2014 (10:17 pm)
Hello,This is my progress: http://postimg.org/image/sijktoo0j/ .
What are you telling me is very interesting. Could you please explain it more?
Thank you.
#8
11/15/2014 (7:14 am)
Maybe check out the Marble Motion game that was made to demonstrate the LeapMotion device integration.
#9
I must mentions that i will want to add some guns that shoot from the ball to some targets and i want to be able to aim by moving the mouse. Is this double using you're idea, mr Richard Ranft?
Thank you.
11/17/2014 (1:22 am)
Hello, thank you for link. The demo is nice, and that is the type of movement i want from by ball. I hope the Richard Ranft will give me some ideas on how to implement his idea. I am new to T3D and its work-flow. I must mentions that i will want to add some guns that shoot from the ball to some targets and i want to be able to aim by moving the mouse. Is this double using you're idea, mr Richard Ranft?
Thank you.
#10
11/17/2014 (6:01 am)
Hell - that demo has everything you need in it, all of the scripts are there. Just download it and look.
#11
11/17/2014 (6:22 am)
I am only asking because I don't know. I don't want to upset you.
#12
11/18/2014 (6:02 am)
I'm not upset - I'm just saying that the demo has all of the scripts and controls set up, so it would be far easier for you to study them than for me to rewrite all of it....
#13
11/18/2014 (6:41 am)
I did that. But because the player follows the ball, i can't aim.
Torque Owner Richard Ranft
Roostertail Games
You could also try using PhysX, but the implemented integration is for an old version that is difficult to find. There is work on updating that integration to the latest version of PhysX, but I'm going to refer you to the appropriate thread for the status of that effort.