Skip to content

Three.js / Rotate object around its' Y-axis to look in particular direction #3577

@marffinn

Description

@marffinn

I tried to wrap my head around it for at least a week, but it's too heavy for me.
The problem is that when I click on particular coordinates on the PLANE, i want my 3d model to rotate to face the new coordinates, and then change it's position to match the new coordinates ( it would be nice if you also explain to me how to declare objects' speed and move it with that speed ).

I know it has to do something with THREE.Matrix4() function.

(If You ever played starcraft or similar game, you'll know what I'm up to ;> )

Here is the so far THREE.JS code:

https://gist.github.com/marffinn/5804663

Here is what I have so far:
http://i.stack.imgur.com/Gu7Sv.jpg

And here is what I want to achieve:
http://i.stack.imgur.com/Q2vrs.jpg

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions