Alice Community  

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

Reply
 
Thread Tools Display Modes
Any suggestions on making objects stop just before hitting the target object
Old
Sparkee77
Guest
 
Status:
Posts: n/a
Default Any suggestions on making objects stop just before hitting the target object - 02-26-2010, 07:59 PM

With changing my numbers over and over till the object stops in front of the target is there a easier way of making the object stop before hitting my target.
   
Reply With Quote
Old
zonedabone
Senior Member
 
zonedabone's Avatar
 
Status: Offline
Posts: 577
Join Date: Nov 2008
Location: In the interwebs
Default 02-26-2010, 08:18 PM

Here's how I did it with two spheres:

sphereHighPoly move ( ( ( sphereHighPoly distance to sphereHighPoly2 ) - ( subject = sphereHighPoly 's width ) ) ) toward target = sphereHighPoly2

Note that ( subject = sphereHighPoly 's width ) is just how far away you want the object to stop at.

Download the world and see what it looks like!
Attached Files
File Type: a2w Spheres.a2w (202.5 KB, 9 views)


'Apple Macintosh' - An anagram of 'Complaints Heap'

M.A.C.I.N.T.O.S.H. - Machine Always Crashes, If Not, The Operating System Hangs.

You're *such* a mac person.
   
Reply With Quote
seems to work
Old
Sparkee77
Guest
 
Status:
Posts: n/a
Default seems to work - 02-26-2010, 10:32 PM

seems to work did not know if I had to mess with the parameters or variables to do that.
   
Reply With Quote
moving object without collision
Old
jessikamacd
Guest
 
Status:
Posts: n/a
Default moving object without collision - 02-28-2010, 10:57 PM

I am actually newly registered to the alice site due to my needing some technical help, and read your post asking about how to move objects closer without touching and not having to do as you mentioned.... I see there is a response and you figured it out but another suggestion if you are interestead is to create a variable and name it distance, and then using the objects move method, and the objects distance to function, and you can make a mathmatical expression and end with minus (-) the second objects 'depth' and it will stop it right in front of it without 'collision' or placing objects on top of eachother. Hope th at is another idea for you
   
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 ©2020, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.