Quantcast
Channel: Questions in topic: "cookies"
Viewing all articles
Browse latest Browse all 91

making a grid-based movement system ONLY for a child object

$
0
0
hello, i've got this project in which the player moves around crates and stuff. on key down the player "picks up" the crate (by making it its child and setting the transform to 1 on the y axis) and on key up the crate is detached and placed one unit in front of the player. now the problem: my game is semi-grid like as in all the game objects are placed exactly one unit (or 0.5) from each other and the player's task usually involves placing the crates in specific places. now i wanted to give the player a sort of "assistive(spelling?) crate placing system" to improve user experience (without messing with the player itself). now my thoughts are as follow: i have a crosshair object that will tell the player where the create will land once he releases it, can i somehow have this crosshair object to act as a child, and yet snap to the nearest 0.5 point in world coordinates? if anyone could help me i'd be super thankful and give them 10 cookies, maybe even eleven.

Viewing all articles
Browse latest Browse all 91

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>