-
-
Notifications
You must be signed in to change notification settings - Fork 90
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
SteerBehavior - Vehicle facing the wrong direction #71
Comments
Yes, you have to make sure that the default forward direction of the model is (0,0,1). That means when you load the model and add it to the scene, it should look along the positive z-axis. Ideally, you fix this in Blender and just import the updated model. If you don't want to do that, transform the model's geometry via |
Hi @Mugen87 thanks for the reply! I managed to get around this by rotating the model by 180 degrees using the threejs editor :>
Right, this was what I tried before editing the gltf itself. But if I'm not mistaken, since I had to call |
You are using the Check out how a cone geometry is transformed in order to achieve a proper alignment: yuka/examples/math/orientation/index.html Lines 39 to 40 in e6250dc
|
Hi! I'm quite new to threejs and 3d stuff in general and I've been experimenting the SteeringBehavior.
I recently purchased a model from sketchfab and basically my goal is to have the model follow the cursor around in a 2d plane. The model seems to be following the target (point of the cursor) just fine, but the model is facing the wrong way.
Loading the gltf file:
Applying seek behavior to vehicle/my model:
Output:
![Peek 2022-09-22 03-09](https://user-images.githubusercontent.com/47336561/191591376-fea642f3-844c-4a6b-a592-043d5c08f5fc.gif)
Expected Behavior:
Is there a way to rotate the model while the steering behavior is active?
The text was updated successfully, but these errors were encountered: