Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
I am implementing a one dimension movement along the x axis.
The objects are moving but they are in the wrong directions
Code for moving the scene
self.obstacles.position.x -= speed // obstacles = objects
self.map.position.x -= speed // map is the scene
It turns out I forgot to attach my nodes to the worldCamera node.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
how can we make a ball when ever you step on it it rotates in the direction like when you step on ball on real life i serched it on internet but i cant find any result please If anyone have a solution please reply me
Maybe I'm not understanding your question right, but simple spherical parts act like that due to the physics engine. It might not be obvious how they rotate, because of the default material. So try the following: Create an empty game and put the following as a script into your workspace and do nothing else:
local ball = Instance.new("Part", workspace)
ball.Shape = Enum.PartType.Ball
When you now start the game, you'll stand exactly on top of the ball and when walking forward, the ball will turn into the direction as you would expect. Now you can chase it and jump on it, etc.
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this question
I'm trying to make a game where nodes fall from the top of the screen to the bottom, which I've done by using gravity. Now I want to move some nodes from the left side to the right.
I was wondering if I could change the gravity pull on different nodes instead of them falling down the screen the gravity could pull selected nodes left to right.
I know I can do this by using a NSTimer and a function but wondering if I could do this with gravity.
I have tried googling the answer but I can't find the answer to applying two gravity pulls.
I don't think you can have 2 distinct gravity forces into the same physics world.
However if you want some node to "fall" to right you could
Apply another acceleration (same as gravity but opposite direction) to that specific body (this will cancel the gravity pull)
Apply one more acceleration versus right to the specific node.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I'm new here im learning xcode and swift by myself and things are going well.
I wanted to ask what will be the best way (and most exact way) to measure short distances let's say up to 10 meters inside of a building so I cant use GPS
I want to get results in millimeters or centimeters.
Thank you for your time guys
Calculating distances based on device movement and using gyroscope, accelerometer, and other internal sensors is impossible.
There are a few reason why but see this link for an explanation...
https://www.youtube.com/watch?v=_q_8d0E3tDk&list=UUj_UmpoD8Ph_EcyN_xEXrUQ&spfreload=10
Use iBeacon and CoreLocation framework. Here is a video from last WWDC that touches this subject
Taking CoreLocation Indoors
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
In the Image above (Top Image), suppose the black boundary is the phone.
What i was trying to achieve is to randomly generate the red path from the top of the screen and at the same time the red line (path) moves downwards.
Notice how the red path is random and does not have a uniform shape.
My question is how do i achieve this?
I know this has something to do with the random function.
But then generating the random path has been my main obstacle since 8 hours.
I could not generate a shape at every interval of the timer with a specific x coordinate and y coordinate but then as you can see in the next image, how would i generate the line at an angle (rotated)
Have tried hard to search everywhere on the internet but failed.
I always keep stackoverflow my last destination after I fail to achieve any functionality after numerous hours.
Would really appreciate if anyone could help me out with this.
It looks like you could achieve the effect you wish by starting at the top center, and repeatedly choosing 2 random numbers: how far down to go, and how far horizontally to go (positive or negative), until you got to the bottom of the screen. You'd have to be careful not to go off either edge, or you could instead choose a random x-coordinate each step.
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
My problem is visible in this screenshot:
The letter "M" and a ship is cut in half. When I changing the camera position I can see that it looks like invisible boundary "eating" my nodes.
Any ideas what could be done wrong?
Does increasing the value of the zFar property of your camera help ?