Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
Disabling up/down movement
Old
TheTerran
Junior Member
 
Status: Offline
Posts: 2
Join Date: Oct 2012
Question Disabling up/down movement - 12-10-2012, 08:03 PM

Hello everyone, I need help with disabling up/down movement in my FPS game, because my collision detection uses a "move away from" motion to avoid going into buildings, which ends up forcing the camera upwards or downwards.

Thank you for reading this!
Attached Files
File Type: a2w FPSFinal (2).a2w (12.47 MB, 3 views)

Last edited by TheTerran; 12-10-2012 at 08:58 PM.
   
Reply With Quote
Center Points count
Old
MrMoke
Senior Member
 
MrMoke's Avatar
 
Status: Offline
Posts: 501
Join Date: Sep 2007
Location: Austin, Texas
Default Center Points count - 12-10-2012, 08:50 PM

This should only become a problem if the center points of the objects are on a a different vertical plane. moveAway is based on the angle of the vector between two center points. If they are at different heights, you may have to use move back.
   
Reply With Quote
Old
HaloMike117
Junior Member
 
Status: Offline
Posts: 8
Join Date: Dec 2012
Default 12-12-2012, 12:39 PM

Quote:
Originally Posted by TheTerran View Post
Hello everyone, I need help with disabling up/down movement in my FPS game, because my collision detection uses a "move away from" motion to avoid going into buildings, which ends up forcing the camera upwards or downwards.

Thank you for reading this!
I think it would be smarter to prevent movement in a wall rather than using the move away from motion.

Using the distance checks, you could calculate the distance from your location to the wall in question. In your move methods, you check if your distance is greater than or equal to a certain object before moving to prevent moving past the wall. To get closer to the wall (without actually going through the wall) only move a calculated amount.
   
Reply With Quote
Except
Old
MrMoke
Senior Member
 
MrMoke's Avatar
 
Status: Offline
Posts: 501
Join Date: Sep 2007
Location: Austin, Texas
Default Except - 12-13-2012, 09:35 PM

Quote:
Originally Posted by HaloMike117 View Post
I think it would be smarter to prevent movement in a wall rather than using the move away from motion.

Using the distance checks, you could calculate the distance from your location to the wall in question. In your move methods, you check if your distance is greater than or equal to a certain object before moving to prevent moving past the wall. To get closer to the wall (without actually going through the wall) only move a calculated amount.
With few exceptions walls are just a part of an object, and don't have a physical presence. The only measurable item is the reference point for the building. It's possible to add a boatload of invisible dummies to a list to stay away from, but they still have to be on the same plane as the shooter regardless of whether you use a move back or move away.
   
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2019, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.