Jump to content
The Dark Mod Forums

[It does!] Set camera position Python script doesn't use tdm's coordinates


Recommended Posts

So I was reading the DarkRadiant Script Reference  and it gives an example to move the cameraview by setting coordinates:

import darkradiant as dr

camview = GlobalCameraManager.getActiveView()
camview.setCameraOrigin(dr.Vector3(50,0,50))

This works, but then I wanted to use the tdm position coordinates that you can get by doing getviewpos in the console in tdm. But these coordinates don´t give the same position in DR.

Why is that? Is there an other way?

 

Edit: WHOOPS it does actually work. (some layers in the testmap were disabled)

Edited by datiswous
Link to comment
Share on other sites

  • datiswous changed the title to [It does!] Set camera position Python script doesn't use tdm's coordinates

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • JackFarmer

      @joebarnin
      Jeff, I sent you PM a few weeks back but you did not respond. Maybe your inbox is full?
      · 5 replies
    • The Black Arrow

      I was playing Skyrim, got bored fast. Got back to The Dark Mod just for one mission, played "Somewhere above the City" which is not really a great mission but still good, as in above-average.
      My biggest regret is living in this country, where there's a heat wave, I am sweating at 20c and I really wish for temperatures below 5c.
      · 10 replies
    • Skaruts

      Is there something wrong with the forums lately, or is it my browser? I've been having trouble formatting posts, and just now I couldn't format anything at all.
      I'm using Vivaldi.
      Usually I have to: select text, click bold, nothing happens, select again, click bold, then it works. 
      Same for other stuff, like creating spoilers, bullet points, links. Nothing works the first time. 
      · 1 reply
    • STiFU

      Back from a spontaneous 1-week trip to Lanzarote with wife and son. I hope beta testing has been going well...
      · 1 reply
    • datiswous

      Whenever I eat fried chicken these days I think of this scene in The Black Mage..

      · 1 reply
×
×
  • Create New...