playMaker

Author Topic: 3D Isometric Game mouse targeting  (Read 6681 times)

Devosaur

  • Playmaker Newbie
  • *
  • Posts: 1
3D Isometric Game mouse targeting
« on: October 04, 2024, 04:57:43 PM »
Hello, I was trying to create a shooting system in isometric 3D, and I was very confused by the system that would rotate my character towards the mouse, like in Weird West and similar games. I understand that I need to use Mouse Pick for this, but all the guides on the internet try to only use it for pointing and clicking games using only the mouse cursor, but I need to constantly update the player's rotation towards the mouse.

I also need to always have actual vector3 of scene position of mouse to other things. Please help me somebody. If it possible, bcos im very begginer in it, explain how this whole system must works.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15620
  • Official Playmaker Support
Re: 3D Isometric Game mouse targeting
« Reply #1 on: October 25, 2024, 04:43:25 AM »
Hi,

You need to first compute the position of the mouse pointer on the floor of your game, then your player can be rotated towards that point.

for this I have a custom action, called "ScreenTo3dPlanePoint " on the ecosystem, you define your floor plane ( a point and a normal), feed the mouse/pointer screen position and you get the world position, which youc an then use as a pointing target for your player to look at.

Let me know how it goes,

Jean