PDA

View Full Version : Geometry paint Help please


Home3ds
04-20-2009, 06:44 PM
Hi everyone,

I am reading the "Autodesk Official training MaxScript essential" and tried the mouse track example in the book to place my objects on a surface.

Everything works fine but I have no control over the distance between objects being placed on the surface.

Could anyone plz tell me how I can control the distance? Thanks in advanced.



Here is the code I have:


function myFooFunction message intRay obj faceNumber shift ctrl alt =
(

returnValue = case message of
(
#freeMove:
(
if (obj != undefined) and (intRay != undefined) do
(

pot.pos=intRay.pos --position
pot.dir=intRay.dir --direction

)
#continue
)

#mouseAbort: (undefined)
#mousePoint: (undefined)
#mouseMove: (#continue)

)
returnValue
)

JHN
04-21-2009, 07:50 AM
I would store the position of the last created item in a variable and test if the newly created object is at least that distance away from the last created object. You could put that in the if clause.

-Johan

CGTalk Moderation
04-21-2009, 07:50 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.