rotating an object via a key command
3 posters
Page 1 of 1
rotating an object via a key command
I seem to be struggling with a really hard one here.
im wanting to "tilt" an object at a specific time. thats not the problem, the problem is how to code it so that i can make it tilt via a key command.
i founf this on michelles forum. but i dont understand it ? he seems to talk about things well over my own head. so any suggestions?
i have tried the following coding
im wanting to "tilt" an object at a specific time. thats not the problem, the problem is how to code it so that i can make it tilt via a key command.
This is my explanation of the command written some years ago in the object guide available here: http://bve.altervista.org/guide.html (the download link is at the right of the bench picture).
Rotate,Ax,Ay,Az,Theta Rotate the geometric figure in the space
Parameters:
Ax Rotation around the X axis horizontal (0 or 1)
Ay Rotation around the Y axis vertical (0 or 1)
Az Rotation around the Z axis longitudinal (0 or 1)
Theta Rotation angle in degrees (from -359 to 359): positive values give a counterclockwise rotation and negative values give a clockwise rotation (Viewing along axis in positive direction).
Ax, Ay and Az can take the value of 0 or 1 in this way:
1, 0, 0, - the rotation is around the axis X (horizontal).
0, 1, 0, - the rotation is around the axis Y (vertical)
0, 0, 1, - the rotation is around the axis Z (longitudinal)
0, 0, 0, - this is a special case, same as 1, 0, 0, (i.e. rotate around X axis only).
It’s possible to rotate simultaneously the object on more than one axle using more parameters A.. = 1, but the result is difficult to control: to have better control it’s better to use more consecutive Rotate instructions, each one having only one A.. = 1 parameter set.
This instruction is indispensable to orientate solids created with the Cube or Cylinder method, that otherwise are always set vertical. It works equally well (but has little sense) for figures defined using AddVertex / AddFace methods
The Rotate instruction for CSV format has no official corresponding in B3D format.
I realize just now that there is an error: it's written counterclockwise instead of clockwise and vice versa...
However this is the way BVE seams to work.
Rotate,0,0,0,0 = don't rotate (same as rotate,,,,)
i founf this on michelles forum. but i dont understand it ? he seems to talk about things well over my own head. so any suggestions?
i have tried the following coding
- Code:
[Object]
Position = 0, 0, 0
States = APT_Driving_Trailer.csv
statefunction = if[ pluginstate[20] | RotateYFunction = -[0.1]]
[Object]
Position = 0, 0, 0
States = APT_Driving_Trailer.csv
statefunction = pluginstate[21]
RotateYFunction = [0.2]
mrknowitall- Posts : 824
Join date : 2011-07-09
Age : 31
Location : W. Yorkshire
Re: rotating an object via a key command
.
Last edited by lonelyinardwick on Wed May 13, 2020 5:21 am; edited 1 time in total
Guest- Guest
Re: rotating an object via a key command
I suggest the following:
- Code:
[Object]
Position = 0, 0, 0
States = APT_Driving_Trailer.csv
RotateYFunction = if[pluginstate[20], -0.1, if[pluginstate[21], 0.2, 0]]
Emmanuel Vallois- Posts : 4
Join date : 2011-08-23
Age : 39
Location : Nice, France
Re: rotating an object via a key command
ill give that a go! I never knew you was good at animated coding!
mrknowitall- Posts : 824
Join date : 2011-07-09
Age : 31
Location : W. Yorkshire
Re: rotating an object via a key command
I suggest dampening so the cars don't "snap" back upright, instead tilting slowly back. Play with the figures and choose the best.
Similar topics
» Rotating object
» Massive *.csv object vs. composite *.animated object
» Special command to animating object
» Rotating Cylinders
» should default option for object optimization mode in object viewer is low or high instead none ?
» Massive *.csv object vs. composite *.animated object
» Special command to animating object
» Rotating Cylinders
» should default option for object optimization mode in object viewer is low or high instead none ?
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|