Please login or register.

Login with username, password and session length
Advanced search  

News:

For WME related articles and tutorials visit WME Resource Center.

Author Topic: Problem with TurnTo(Object)  (Read 3553 times)

0 Members and 1 Guest are viewing this topic.

MikeHart

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 19
    • View Profile
    • Michael Hartlef Studio
Problem with TurnTo(Object)
« on: February 13, 2005, 02:04:00 PM »

Hi all,

I wanna implement shooting at objects and actors in the 3D demo.

For an example, in the door script I added:
Code: [Select]
////////////////////////////////////////////////////////////////////////////////
on "Shoot"
{
  //The next line doesn't behave like I expect it to do
  actor.TurnTo(this);   

  actor.TalkAsync("I don't have the keys. So take this...");
  actor.PlaySound("sounds\shoot.wav");
}

What I thought was, no matter where my 3DActor stands it will turn towards the door. But it doesn't.
It turns away from the door. What do I not understand here, or is it a bug?

Cheers
Michael

Logged
System: Sony Notebook Viao GRT-PCG815E, Pentium 4 with 2,8 GHz, 512 RAM, GeForceFX 5600 Go with 64 MB, WinXP Home SP1

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Problem with TurnTo(Object)
« Reply #1 on: February 13, 2005, 03:51:26 PM »

Yes, it's a bug. You can try downloading the latest WME build here: http://dead-code.org/download/wme_latest.zip
It should be better now, although not perfect, because there can still occur some imprecisions when converting between the 2D and 3D coordinates, depending on the geometry layout.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

MikeHart

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 19
    • View Profile
    • Michael Hartlef Studio
Re: Problem with TurnTo(Object)
« Reply #2 on: February 13, 2005, 04:01:35 PM »

Thanks for the fast reply. I will try that. And here is a small reply:

actor3D.TurnToActor3D(actor3D);

What would help big time.

Cheers
Michael
Logged
System: Sony Notebook Viao GRT-PCG815E, Pentium 4 with 2,8 GHz, 512 RAM, GeForceFX 5600 Go with 64 MB, WinXP Home SP1

MikeHart

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 19
    • View Profile
    • Michael Hartlef Studio
Re: Problem with TurnTo(Object)
« Reply #3 on: February 13, 2005, 04:04:30 PM »

Ok, works like a charm so far. Thank you very much. Now I would need that
TurnToActor3D functionality.

I hope that wouldn't be to much to ask for.

Michael
Logged
System: Sony Notebook Viao GRT-PCG815E, Pentium 4 with 2,8 GHz, 512 RAM, GeForceFX 5600 Go with 64 MB, WinXP Home SP1
 

Page created in 0.033 seconds with 21 queries.