Crystal Space
Welcome, Guest. Please login or register.
November 17, 2017, 10:10:56 pm

Login with username, password and session length
Search:     Advanced search
9081 Posts in 2051 Topics by 80342 Members
Latest Member: Munuzaq9h
* Home Help Search Login Register
+  Crystal Space
|-+  Crystal Space Development
| |-+  Support
| | |-+  iPcActorMove and Acceleration
« previous next »
Pages: [1] Print
Author Topic: iPcActorMove and Acceleration  (Read 2297 times)
Posts: 6

View Profile Email
« on: December 30, 2007, 11:21:22 am »

Hello Everyone,

I am using Crystal Space and CEL for a simulation(,1490.0.html). Since I need the simulation time to be independent of real time, I adjusted the Virtual Clock for my needs, so that with every Advance the clock advances exactly 10ms.

But now I have run into a problem. I am using a CEL Player Entity for my robot. I used PcActorMove to move my robot around. I change the speed depending on an algorithm and I have my own calculations to restrict the robots acceleration. But now I noticed that PcActorMove restricts acceleration. I can't just punch in a velocity of 1.0 and the robot immediatly moves at 1.0 speed, but it slowly accelerates.

I am using the Coordinates of the camera to determine where my robot is [pccamera->GetCamera()->GetTransform().GetOrigin()]. So maybe just the camera is accelerating slower and I can get the correct Coordinates somewhere else?

I am not sure I could properly explain the situation, so I will give an example what the desired effect is: I do

Then I let the simulation run for exactly 1 (simulated) second, I want the change in position of the robot (and the robot camera) to be exactly 1.0 distance units away from the starting point. Is there any way to achieve that? Where is the restriction of the acceleration located?

Posts: 48

View Profile
« Reply #1 on: December 30, 2007, 10:59:24 pm »

Camera always has spring and always follows the actor smoothly (except first person mode in the newcamera).
Use robot's pcmesh to get correct information.

About acceleration - I don't remebmer how actormove is made internally, but there is no acceleration control it's hardcoded (if exists) because it's specific for games. You cna always control everything via CS. Check the CS API.
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 8.307 seconds with 17 queries.