Can not hold 4-wheler tires at specific angle

Got questions, comments and/or feedback regarding Craft Director Studio? Post them here.
Forum rules
We only allow posts that
  • Is in English
  • Is related to our tools and the programs they support.

If these rules are not met you are most likely going to be banned.

Please Note:
  • New users will have their posts reviewed before being publicly available for other to see.
Post Reply
kemalsaglam2
Posts: 4
Joined: Mon Sep 09, 2024 10:38 am

Can not hold 4-wheler tires at specific angle

Post by kemalsaglam2 » Mon Sep 09, 2024 10:46 am

Hello. I am trying to make tires of a 4-wheler stay in same anlge for example 45 degree left. When I press the left button tires turn left and when I release the button tires go back to their default angle which is 0. How can I hold the tires for example 30 degree right and stay in that degree for 10 seconds and then turn to default 0 degree?

Patrik Martin
Partner
Posts: 416
Joined: Mon Feb 25, 2008 1:07 pm
Location: Gothenburg, Sweden
Contact:

Re: Can not hold 4-wheler tires at specific angle

Post by Patrik Martin » Mon Sep 09, 2024 3:27 pm

Hi and welcome to the forum.

Slightly confused to how you like this to function.

But there are a couple of different solutions to do this.
  • Option 1: Configure the input for steering. Then hit record and press the button to turn the wheel and release after desired time. If you need this to be exact you can always record over the time, stop the recording and then pull back the timeline to the exact amount of frames you like to have and hit record again without pressing the steering.
  • Option 2: Click on the advanced button for the steering input to configure an offset (makes the button be always pressed, 1 = 100%). Go over the desired time, stop the recording, remove the input offset, pull back the timeline to the desired time for straight steering and record again.
Please note that the steering angle is set in radians so for 30% steering angle you would set the maximum to 0,8660 and then give a 100% input to the 4-wheeler steering.


There is also some other solutions, but would one of these be sufficient?
Partner
http://www.craftanimations.com
patrik.martin-at-craftanimations.com

kemalsaglam2
Posts: 4
Joined: Mon Sep 09, 2024 10:38 am

Re: Can not hold 4-wheler tires at specific angle

Post by kemalsaglam2 » Mon Sep 09, 2024 5:24 pm

Thanks for the reply but actually I am trying to prevent that "stop recording change offset and start recording again" process.

Closest solution i've found in one week is that I am using a distance ruler limit distances and attach it to 4-whelers "Steering Wheel(Right/Left)" control.

When limit distance value is 0.0 car goes staright when limit distance value is 0.2 car steering wheel turns 0.2 degree right and stays there and car continues to turn rigth at 0.2 degree. If I animate distance ruler node and make limit distance 0.7 car starts to turn right more and turning angle stays at 0.7 and then I animate the distance ruler node and make limit distance value 0.0 again then the car goes straight again. This is exactly what I want. I can control the turning angle by just animating the distance ruler node in the scene. I want to make this exactly the same for the left turns but when I choose "Distance Ruler Limit Distance" as controller, left option diseppears. I want to aplly this exact same process to left turns too.

I am trying to hold steering wheels angle at a specific value for a specific time by just animating a ruler node or anything else etc. I don't want to deal with stop recording change values and record again process.

Patrik Martin
Partner
Posts: 416
Joined: Mon Feb 25, 2008 1:07 pm
Location: Gothenburg, Sweden
Contact:

Re: Can not hold 4-wheler tires at specific angle

Post by Patrik Martin » Tue Sep 10, 2024 2:05 pm

Nicely found with the DistanceRuler and linking it to the Input for the 4-wheeler. I was going to write about the DistanceRuler as an option, however, it is slighly more complicated to set up.

The issue is that the distant ruler only outputs positive numbers. So first when you connect you will notice that it will only can turn right. You need negative numbers to be able to do left turns. However, the good news is that there is a trick that can be used to solve this. If you go in to the Advanced setting for the input for the Steering Wheel you can create negative numbers by offsetting the input to have a negative number by default.
screenshot.361.png
Advanced input settings

This means that;
  • When the nodes are exactly in the same place it will turn 100% to the left as the input is 0 which then outputs -1 to the steering (-1+0 = -1).
    screenshot_362.png
    DistanceRuler nodes in same place
  • When they are 1/2 overlapping the input is 1 and thus means 0 steering angle (-1+1 = 0).
    screenshot_362_2.png
    DistanceRuler nodes half överlapping
  • When the nodes are just touching each other the input will be 2 and thus will make the steering be 1, which is fully to the right (-1+2 = 1).
    screenshot_362_3.png
    DistanceRuler nodes just touches
Did that do the trick for you?
Partner
http://www.craftanimations.com
patrik.martin-at-craftanimations.com

kemalsaglam2
Posts: 4
Joined: Mon Sep 09, 2024 10:38 am

Re: Can not hold 4-wheler tires at specific angle

Post by kemalsaglam2 » Tue Sep 10, 2024 2:45 pm

That is exactly what I was trying to do. Thank you so much!

Post Reply

Who is online

Users browsing this forum: No registered users and 31 guests