Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
Rims Flames
11
Years of Service
User Offline
Joined: 5th Apr 2014
Location:
Posted: 28th Jul 2014 00:44
Hi guys,

I always wondered, how can i do vertex snapping to the objects like, if i have two boxes with the same size, when the first object reaches the second object i want the first object to placed glued to the second object.

How can i possibly do this?

Thank you very much!

Rims Flames
david w
19
Years of Service
User Offline
Joined: 18th Dec 2005
Location: U.S.A. Michigan
Posted: 28th Jul 2014 17:13
addmesh to vertex data. they will then become one object. getting them apart after this will be difficult or impossible.

or you could add the one as a limb of the second

or you could just keep them together with math

or you could use the csg union command

or you could combine them with memblocks

or, or, or, or, or lol you get the point plenty of ways
Rims Flames
11
Years of Service
User Offline
Joined: 5th Apr 2014
Location:
Posted: 28th Jul 2014 20:15
sure indeed a lot of possibilites. But i don't really know how can i code something like this. Can you please show me an example with the best idea by snapping them to make one object and then to get them appart? Thank You.

Rims Flames
Green Gandalf
VIP Member
20
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 29th Jul 2014 00:32 Edited at: 29th Jul 2014 00:51
Something like this might work:



It isn't quite right yet - if you right click the green cube to move it past the dark red block control then switches to the dark red as they pass. Anyone care to fix the bug?

Edit Fixed code, I hope:



It looks a bit more complex than it needs to be to me.



Powered by Free Banners
Rims Flames
11
Years of Service
User Offline
Joined: 5th Apr 2014
Location:
Posted: 29th Jul 2014 13:35
Very good example GreenGandalf! That's exactly what i wanted, thank you!

Rims Flames
Green Gandalf
VIP Member
20
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 29th Jul 2014 22:05
You're welcome.



Powered by Free Banners
david w
19
Years of Service
User Offline
Joined: 18th Dec 2005
Location: U.S.A. Michigan
Posted: 30th Jul 2014 00:17
Hey I just got home and was just about to make and example, but since problem solved. Great Job!
Rims Flames
11
Years of Service
User Offline
Joined: 5th Apr 2014
Location:
Posted: 30th Jul 2014 11:58
Hey david w,

No problem thank you!

Rims Flames

Login to post a reply

Server time is: 2025-05-15 10:23:59
Your offset time is: 2025-05-15 10:23:59