So I am making a simulation in C++ and I am using SFML for graphics. I am going to use this image here to explain what I am trying to do. So here's the issue I am facing. I spawn an object (at entry) and I want that object to move to '1'. Then I would like to move it to '4'. After that I would like to move it to the counter '1'. Now as you can see, the brown shelves labelled 1,2,3,4,5,6 are supposed to have boundaries. Same for the counter and walls as well. What I need help is in defining these boundaries OR defining movement paths so that the object moves from '1' to '4' to counter '1' without colliding with anything. I could hard-code all the paths but I am short on time and the code will get really really long. So if there is a simpler way to do this then please do tell. I appreciate all the help, thank you!
https://stackoverflow.com/questions/65425413/sfml-moving-sprite-in-random-fixed-paths December 23, 2020 at 09:53PM
没有评论:
发表评论