- Forums
- Forum Help
- Search Forum
- Login
- Register
Truevision3D
>>
TV3D SDK
>>
TV3D SDK 6.5
(Moderators:
Waterman
,
Mithrandir_
,
beyonder
,
ZaPPZion
) >>
MoveRelative.
Pages: [
1
]
« previous
next »
Print
Author
Topic: MoveRelative. (Read 927 times)
PhunkeyMonkey
Customers
Community Member
Posts: 126
MoveRelative.
«
on:
March 02, 2005, 09:43:28 PM »
pInput->GetAbsMouseState( &iX, &iY, &b1 /*left*/, &b2/*right*/, &b3, &b4, &bR/*mouse roll*/ );
niX = iX - oiX, oiX = iX; // X Push value
niY = oiY - iY, oiY = iY; // Y Push Value
if( niX != 0 && b2 )
pScene->GetCamera()->MoveRelative( 0.f, 0.f, niX * tick, false ); // Pan left/right around model
When executing this, it rotate's around the model correct, but it also moves the camera position back more.. so eventually if you keep spinning around the camera moves so far back that you don't see anything.. this shouldn't occur unless i am doing something totally wrong that i am unaware about.
Logged
The above post may have been posted by one of many programmers at our college, if you find it offensive, please let us know.
tweakbox
Customers
Community Member
Posts: 1194
MoveRelative.
«
Reply #1 on:
March 02, 2005, 10:31:37 PM »
use math.movearoundpoint it works much better
Logged
I want to make a puzzle with like 40,000 pieces, and when it's done, it says "Go Outside"
PhunkeyMonkey
Customers
Community Member
Posts: 126
MoveRelative.
«
Reply #2 on:
March 02, 2005, 10:36:54 PM »
It still means that MoveRelative has a bug in it. avoiding it doesn't fix a problem in the engine..
But i will look into math.movearoundpoint for now until it is fixed.
Logged
The above post may have been posted by one of many programmers at our college, if you find it offensive, please let us know.
SylvainTV
Administrator
Community Member
Posts: 4946
MoveRelative.
«
Reply #3 on:
March 04, 2005, 02:56:07 PM »
There is no bug actually.
It's the logic behind that is wrong.
If the Tick was infinitesimal, it would work and do a good circle around.
However in your case the tick isn't small enough, and it gives problems.
So you can't use a relative method, prefer trigonometry or MoveAroundPoint method, that will always work better.
Logged
Regards
Sylvain Dupont
TrueVision3D Developer
sylvain@truevision3d.com
TV3D IRC at
http://chat.truevision3d.com
or on server irc.truevision3d.com #Truevision3D. Come talk with us !
Waterman
Moderator
Community Member
Posts: 1157
MoveRelative.
«
Reply #4 on:
March 04, 2005, 04:12:09 PM »
Or estimate (based on frame rate) where the next point on the circle is, and move towards that instead of in the tangent direction.
Logged
Things should be described as simply as possible - but not simpler [A. Einstein]
Anti-Gremlin
Community Member
Posts: 862
MoveRelative.
«
Reply #5 on:
March 07, 2005, 06:37:55 AM »
Yeah i used MoveAroundPoint() which works well.
Logged
Project:
It's a secret..
Progress:
<secret progress>
TV3D Chat:
http://www.voidzero.com/chat/chatter.cgi?channel=tviug
TV3D Wiki Doc:
http://wiki.truevision3d.com/
TV3D TVDN:
http://www.truevision3d.com/tvdna/
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Truevision3D Official Information
-----------------------------
=> Development Information
-----------------------------
TV3D SDK
-----------------------------
=> TV3D SDK 6.3
===> Bugs
-----------------------------
Game Development
-----------------------------
=> Game Development
-----------------------------
Projects
-----------------------------
=> In-Development
=> Showcase
=> Recruitment
=> Announcements
-----------------------------
Truevision3D Official Information
-----------------------------
=> News and Announcements
-----------------------------
TV3D SDK
-----------------------------
=> TV3D SDK 6.5
-----------------------------
Game Development
-----------------------------
=> Engine Comparison
-----------------------------
TV3D SDK
-----------------------------
===> Shader Development
===> Content Pipeline
===> Bugs
-----------------------------
Game Development
-----------------------------
=> Companion Tools
=> Design and Theory
Powered by SMF 1.1.3
|
SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks