Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

animate wheel rotation on vehicles #30

Closed
kfarr opened this issue Jul 22, 2022 · 6 comments
Closed

animate wheel rotation on vehicles #30

kfarr opened this issue Jul 22, 2022 · 6 comments
Assignees

Comments

@kfarr
Copy link
Collaborator

kfarr commented Jul 22, 2022

Start with 1 vehicle object (sedan) add animation to all 4 tires turning forwards at a speed of:

@gnansai
Copy link
Collaborator

gnansai commented Jul 25, 2022

image
image

@gnansai
Copy link
Collaborator

gnansai commented Jul 25, 2022

https://github.com/gnansai/3dstreet-assets/blob/main/sets/vehicles-animation/gltf-exports/sedan-wheel-rotation.glb
Hi @kfarr @srothst1
The Above the link is the animation file of Sedan.
I made one rotation for every 2.26seconds.
I would suggest we calculate the animation for wheel using code.
By manually animating the wheel rotation, we are limiting our cars to move 1meter/ Second.
We could have variable speeds if we could animate the wheels using Code.

@gnansai
Copy link
Collaborator

gnansai commented Jul 25, 2022

image
I have used the Rig to Animate the wheels.

@gnansai
Copy link
Collaborator

gnansai commented Jul 28, 2022

https://wealthy-rural-larch.glitch.me
I am experimenting with A-Frame Component.

Here is the link to the source
https://glitch.com/edit/#!/wealthy-rural-larch

@gnansai
Copy link
Collaborator

gnansai commented Jul 28, 2022

r = number of rotations;
d = distance travelled by Vehicle;
c = circumference of the wheel;

r = d / c ;

I followed this for wheel rotation

2022-07-28.23-05-42.mp4

@kfarr
Copy link
Collaborator Author

kfarr commented Aug 3, 2022

This is great! I'm marking this ticket as done, I made 2 others to represent the next steps:

@kfarr kfarr closed this as completed Aug 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants