- #1
sofcal
- 2
- 0
Hi guys.
Sorry if this seems like an extremely simple question, but I am never took physics. I am a programmer attempting to work with a physics system in an application. What I am trying to do is create a physical object in the system that represents the users mouse (the object being a cylinder projecting down from the camera into the scene).
I need to move the projected object with the mouse, and because of the system, this has to be done with a force, so that I can add gravity on top of it. I was previously setting the velocity of the object, since I know the old and new mouse position (at each movement) and the time between these moves. This however doesn't allow me to add gravity as a force.
Unfortunately due to my appaling understanding of physics, I am finding this quite difficult. I know the distance travelled, the time taken. I've tried extrapolating the acceleration from suvat equations, but to no avail. Apologies for posting what is most likely a very simple question, but this is a small part of a much larger project, and was hoping somebody could point me quickly in the right direction.
Cheers in advance, cal.
Sorry if this seems like an extremely simple question, but I am never took physics. I am a programmer attempting to work with a physics system in an application. What I am trying to do is create a physical object in the system that represents the users mouse (the object being a cylinder projecting down from the camera into the scene).
I need to move the projected object with the mouse, and because of the system, this has to be done with a force, so that I can add gravity on top of it. I was previously setting the velocity of the object, since I know the old and new mouse position (at each movement) and the time between these moves. This however doesn't allow me to add gravity as a force.
Unfortunately due to my appaling understanding of physics, I am finding this quite difficult. I know the distance travelled, the time taken. I've tried extrapolating the acceleration from suvat equations, but to no avail. Apologies for posting what is most likely a very simple question, but this is a small part of a much larger project, and was hoping somebody could point me quickly in the right direction.
Cheers in advance, cal.