Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Lerp Confusion

Author
Message
Greg_C
14
Years of Service
User Offline
Joined: 22nd May 2010
Location:
Posted: 29th Feb 2012 07:05 Edited at: 29th Feb 2012 07:15
T2
Maybe there is a better to do this and lerp isn't what I should be using but anyway here is what I am doing:



Two problems with this:

The first is sometimes my object will stop before it gets to the target position (m_eggPosX). the Second is I don't want to have it slow down as is it gets closer to the object I want it to keep the same constant speed. How would I go about doing this? is Lerp not the correct way to go about this?
Greg_C
14
Years of Service
User Offline
Joined: 22nd May 2010
Location:
Posted: 29th Feb 2012 09:28
So I figured out a different way to go about it if anyone is interested:



So this basically takes the starting position of my object and the position I want it to go to and sends my object at a constant speed towards the final destination. This could be used as a missile as well if the final destination were to constantly move. Anyway this is what I was going for. Maybe it will help someone else.
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 29th Feb 2012 10:08
Greg_C, looks like you got it figured but there are some Tier 1 solutions to this kind of thing in the UCF project thread that could easily be translated.

UCF Project (Useful Community Functions)

Greg_C
14
Years of Service
User Offline
Joined: 22nd May 2010
Location:
Posted: 29th Feb 2012 17:16
Okay great I will have to look into these for the future.

Login to post a reply

Server time is: 2024-11-23 04:54:56
Your offset time is: 2024-11-23 04:54:56