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 Studio Chat / 3D Object Look At?

Author
Message
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 27th Apr 2020 17:57
Hi, I know there is an "object look at" function which works fine but lets say I got a spaceship facing a direction and I want it to slowly face another direction.

The below function is lifted from the UCF Project and does the above but in 2D


Any of you math gurus fancy giving some pointers on how to adapt this for use in a 3D environment, I'd gladly donate a few beers for a working solution.
Scraggle
Moderator
20
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 27th Apr 2020 18:06
I've polished off an entire bottle of wine with my dinner so I might be talking nonsense here but couldn't you just tween each of the three axis from where they are to where you want them?
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 27th Apr 2020 18:09
I didn't think about tweening that might work, I'll take a look.

You've made me want a drink now lol
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 28th Apr 2020 12:46
I'm tempted to release a version of EZrotate for AppGameKit!
a.k.a WOLF!
smallg
Valued Member
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location: steam
Posted: 28th Apr 2020 14:41
yh a lerp would be nice but this might work... looks ok in a quick test - hard to tell from a flat perspective but i did add a nose just to see which way he's facing

life's one big game
spec= i5 4ghz, 16gb ram, Nvidia 1070ti gpu

Login to post a reply

Server time is: 2024-04-19 02:14:26
Your offset time is: 2024-04-19 02:14:26