playMaker
Home
Store
Showcase
Tutorials
Forums
Manual
Wiki
About Us
Playmaker Forum
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Register on the forums to download actions, updates, etc.
Home
Help
Search
Login
Register
Playmaker Forum
»
PlayMaker Help & Tips
»
PlayMaker Help
»
[SOLVED] Top down shooter, turret to aim at mouse
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: [SOLVED] Top down shooter, turret to aim at mouse (Read 759 times)
AncAinu
Playmaker Newbie
Posts: 2
[SOLVED] Top down shooter, turret to aim at mouse
«
on:
September 15, 2021, 06:47:15 AM »
I am trying something simple, have a turret follow (if possible smoothly) the mouse pointer on a top-down 2d view.
And despite all my attempts and watching tutorials, I can't figure it out.
Any help appreciated
«
Last Edit: September 17, 2021, 08:51:44 AM by AncAinu
»
Logged
RapperCerberus
Playmaker Newbie
Posts: 11
Re: Top down shooter, turret to aim at mouse
«
Reply #1 on:
September 15, 2021, 10:11:22 PM »
I'll do that like this:
Use <get mouse X> and <get mouse Y>to get the position of mouse cursor on screen.
Use <screen to world point> to change mouse cursor's screen position to world position.
And then use <set position> to set an object to the mouse cursor's world position.
Last step, use <smooth look at> to let turret look at the object all the time.
Notice: every step need to be <every frame> turn-on. Hope this can help you.
Logged
AncAinu
Playmaker Newbie
Posts: 2
Re: Top down shooter, turret to aim at mouse
«
Reply #2 on:
September 17, 2021, 08:51:05 AM »
Yes that worked thank you so much!
Logged
RapperCerberus
Playmaker Newbie
Posts: 11
Re: [SOLVED] Top down shooter, turret to aim at mouse
«
Reply #3 on:
October 14, 2021, 01:32:47 AM »
np:) glad I can help
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
Playmaker Forum
»
PlayMaker Help & Tips
»
PlayMaker Help
»
[SOLVED] Top down shooter, turret to aim at mouse