Turn player + Camera?

Have any questions or problems in making your game, subscribing and/or using our software? Post here.
Forum rules
Make sure you are using the newest version. This can be downloaded at the top of the site via the "downloads" link.

Use a very good subject. "Problem" or "Help" are unacceptable titles.

Use the search feature before posting a question, as the answer is probably already here.

Subscript out of range error 9: This is a generic error, and we'll need way more information than that to figure out the problem. If you get this, strongly consider following the instructions of submitting your project through the Submit Bug feature within the editor.
User avatar
Danny
001 Forum Master
 
Joined: Tue Jul 12, 2011 7:14 am

Turn player + Camera?

Postby Danny » Tue Aug 23, 2016 8:16 pm

Topdown Template - 2D

How would i make the character turn left or turn right but also have the camera turn left or right at the same time? Giving the effect that the actual map is moving as well as the player. Turning will turn towards the mouse cursor.

Thanks in advance.

Edit: Bump.

dragonnutds
001 Subscriber
 
Joined: Tue Oct 27, 2009 2:06 pm

Re: Turn player + Camera?

Postby dragonnutds » Tue Aug 23, 2016 8:38 pm

change horazontal orbit to always face away from the direction the actor is pointing, keep in mind you will have to set your sprites to billboard or they will turn into paper cutouts.


oh ya, also you might consider not using walls if you are going for a mode 7 look, they do render as colloms no matter what

use lower objects or if you need terraforming use floors with collisions placed on top
Last edited by dragonnutds on Tue Aug 23, 2016 8:41 pm, edited 1 time in total.
Reason: Automatically merged double post.
Image

User avatar
Danny
001 Forum Master
 
Joined: Tue Jul 12, 2011 7:14 am

Re: Turn player + Camera?

Postby Danny » Tue Aug 23, 2016 9:01 pm

I'm not following sorry. Can you give me a little more detail please? What's Mode 7? Neverheard of it. I'm using topdown view, topdown sprites and tilesets. I just want the camera to move around exactly like the video below. The arrow is the "Player" and the rest of the things in the map are going to be "Tilesets"

The player will always face the mouse, i want the camera to also rotate EXACTLY as it is doing in the video. Ideas? Thank you.


dragonnutds
001 Subscriber
 
Joined: Tue Oct 27, 2009 2:06 pm

Re: Turn player + Camera?

Postby dragonnutds » Tue Aug 23, 2016 9:42 pm

ok, first, how are you handling player rotation,


wait you are in discord i can ask you there
Last edited by dragonnutds on Tue Aug 23, 2016 9:42 pm, edited 1 time in total.
Reason: Automatically merged double post.
Image

User avatar
Danny
001 Forum Master
 
Joined: Tue Jul 12, 2011 7:14 am

Re: Turn player + Camera?

Postby Danny » Mon Aug 29, 2016 2:58 am

Edit/Update: 29/08/2016

Still need help with this. Discord did not happen.

Anyone? Thank you :)

User avatar
Mr.Numbers
001 Support
 
Joined: Wed Feb 28, 2007 1:50 am
Location: Alberta, Canada

Re: Turn player + Camera?

Postby Mr.Numbers » Mon Aug 29, 2016 2:30 pm

Ok, just to make sure I got this correct you have a top-down game, moving the cursor would turn the camera & the player at the same time. However, how exactly do you want it to perform? Do you want it so it constantly spins if you don't have the cursor exactly in the middle? Do you want it so it only picks up left/right movement in the mouse? There's alot of things I'd need to know before I could assist with this issue (Since each one would require a different script)

If you want, you can send me a pm on discord and I could assist you there further, or post back here and next time I see this post with some updated information on some specifics I could help you out here.
Image
I AM THE ALL MIGHTY SCRIPTING MASTER
Please do not PM me with Engine 001 related questions, rather post on the forums. ;)

User avatar
Danny
001 Forum Master
 
Joined: Tue Jul 12, 2011 7:14 am

Re: Turn player + Camera?

Postby Danny » Mon Aug 29, 2016 3:20 pm

Mr.Numbers wrote:Ok, just to make sure I got this correct you have a top-down game, moving the cursor would turn the camera & the player at the same time. However, how exactly do you want it to perform? Do you want it so it constantly spins if you don't have the cursor exactly in the middle? Do you want it so it only picks up left/right movement in the mouse? There's alot of things I'd need to know before I could assist with this issue (Since each one would require a different script)

If you want, you can send me a pm on discord and I could assist you there further, or post back here and next time I see this post with some updated information on some specifics I could help you out here.


It's exactly the same way as the video in the post above. You turn (The arrow) and the camera turns with it. :?

User avatar
Mr.Numbers
001 Support
 
Joined: Wed Feb 28, 2007 1:50 am
Location: Alberta, Canada

Re: Turn player + Camera?

Postby Mr.Numbers » Mon Aug 29, 2016 3:34 pm

You can use the "Face direction of location" event to make the player face the location of the cursor (Using the Cursor.Targetted?of?(0) events as the location) then place a "Change Horizontal Orbit" event that sets the orbit to Actor("main").DirectionAngle
Image
I AM THE ALL MIGHTY SCRIPTING MASTER
Please do not PM me with Engine 001 related questions, rather post on the forums. ;)

User avatar
Danny
001 Forum Master
 
Joined: Tue Jul 12, 2011 7:14 am

Re: Turn player + Camera?

Postby Danny » Thu Sep 01, 2016 12:17 pm

I get odd results :?


dragonnutds
001 Subscriber
 
Joined: Tue Oct 27, 2009 2:06 pm

Re: Turn player + Camera?

Postby dragonnutds » Thu Sep 01, 2016 10:13 pm

dont face the mouse cursor, find another way to change look direction. perhaps change rotation based on mouse movement instead.
Image


Return to Technical Support Questions

Who is online

Users browsing this forum: No registered users

cron