1. #1

    Rotating and move object at the same time

    Hi,

    I can rotate a object with a item position event and lineair data source and a interval trigger.
    I can change position a object with a item position event and lineair data source and a interval trigger.

    But when i use both at the same time on same object it goes to the ground or something strange place.
    I will that it move forward and rotate it at the same time.

    Is this possible?
    Share this post

  2. #2
    Do you have rotation set to Local?
    Share this post

  3. #3
    Tested it with local on and local off.
    Share this post

  4. #4
    Position should be global with rotation local.

    If position is local, it moves on the objects XYZ axis. So for example, if an object in default position is moved up on the Y axis, like a lift, when it is rotated say 90 degrees clockwise, it will still move on the Y axis which will then be facing left to right.

    So if you have position as global, it will move on the world XYZ axis which does not change direction when object is rotated. You will have to use object position coordinates to adjust movement on global axis. You can use the linear data source, just use global coordinates for the values.

    I can put together a small example later when I get home, if you still need help.
    Share this post

  5. #5
    If you can place a small example it will be great!
    I can't get it work

    Thanks!
    Share this post

  6. #6
    @OLD_RockMan

    Do you have a example?

    Thanks!
    Share this post

  7. #7
    Yeah I got an example made, sorry for the delay. I will put it together and have it up here later today.
    Share this post

  8. #8
    Here is an example of an Object Position Event with modified global position and local rotation.

    In this image, there is a ramp in the background that will move and rotate onto the driveline in front of the truck. An Area Trigger is used to send an impulse to a State Event that turns on the Impulse Trigger, Curved Data Source, and Curved Vector Data Source.

    First, I will explain how I setup the data sources for movement and rotation. Below is a closer image of these data sources.

    Starting with the ramp, I placed one ramp in the background. This ramp will be the target object of the Object Position Event and will also be used for the Start position coordinates of the Curved Vector Data Source. A copy of this ramp is placed on the driveline, this is used only for the Stop position coordinates.

    Using Vector Object Info data sources (2 on right) set to Position, I link one to each ramp. This gives the global coordinates of the ramps on the world's XYZ axis. Then I enter these coordinates into Vectors (2 in center).


    Moving to the Curved Vector Data Source, in it's properties I link the Start value to the Vector holding coordinates of the ramp in background. This is where the animation starts. Then I link the Stop value to the Vector holding coordinates of the ramp on the driveline. This is where the animation will stop. I set the duration to 1 second.

    Now for rotation, since it is local and only rotates 1 axis, this will be easy. The ramp only needs to rotated 90 degrees on it's X axis or Yaw. I used a Curved Data Source for this as I am only rotating 1 axis, and set the Start value to 0, and Stop value to 90. The duration is set to 1 second to match the position. This way they both animate at same speed and at same time.

    Now on to the Interval Trigger and Object Position Event. For the OPE, I turn on Modify Position, turn off Local, linked the XYZ positions to the Curved Vector Data Source. I also turn on Modify Rotation and turn on Local, and link the Yaw value to the Curved Data Source, leaving Bank and Pitch at 0 as they are not changed. Then select the ramp in the background as the target.


    For the Interval Trigger, set the Start tick to 0 and intervals to 1 for smoothest animation.


    When everything is set and done right, it should work like this.


    If everything works as it should, the 2 Vector Object Info data sources and ramp on driveline can be deleted. They are no longer needed as the values are set in Vectors.
    Share this post

  9. #9
    @OLD_RockMan,

    It is very cool what you made (really!), but i mean another "problem".
    In this video you can see what i mean: http://www.kene.nl/rotatemove.mp4
    If i do only rotating it works.
    If i do only moving it works.

    Buth both on the same time it don't work.
    Share this post

  10. #10
    So you want the saw blade to rotate or spin while moving from left to right. And you don't want the saw blade to rotate in a circular motion, correct?

    You can use a similar setup to the example I made. When I get home later I will put it together just as you have it, and reply back.
    Share this post