Please login or register.

Login with username, password and session length
Advanced search  

News:

This forum provides RSS feed. To query recent posts use this url. More...


Author Topic: Attachment movement  (Read 5316 times)

0 Members and 1 Guest are viewing this topic.

Baron

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 37
    • View Profile
    • Portfolio
Attachment movement
« on: January 22, 2009, 02:16:58 PM »

I have an actor (a model of a camera) that I attach to my player character at certain times (when he takes a photo). But the trouble is that it seems to vary its position from scene to scene.
It seemed it might be the same problem that Foggobbler had with his characters Head. I added the Droptofloor = false
but It still varies its position depending on the scene. Is this the same problem? or am I abusing code again?

Code: WME Script
  1. var CamAtta=Game.LoadActor3D("actors\Camera\camera.act3d");
  2.   CamAtta.Active = true;
  3.   CamAtta.DropToFloor = false;
  4.   actor.AddAttachment("actors\Camera\Camera.x", "Camera", "Bip01_R_Hand");

here is an example of different positions.


« Last Edit: January 22, 2009, 02:25:31 PM by Jyujinkai »
Logged

Jyujinkai

  • Global Moderator
  • Frequent poster
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 352
    • View Profile
    • Jyujinkai's WME Development Blog
Re: Attachment movement
« Reply #1 on: January 22, 2009, 02:30:59 PM »

Have the object always attached 100% of the time in the actor file that is loaded itself, in this case linked to teh hand bone driving your rig, before export... . so if the camera is in inventory it will load a actor3d file that is has the camera in it, rather than fiddling about loading and attaching 2ndary 3d files.

Then map an opacity to the camera to make it invisible, when the camera is taken out change the textures on the camera. Even with stencil shads you should be able to make the camera 100% invisible.
Logged
<Antoine de Saint-Exupéry> In any thing at all, perfection is finally attained not when there is no longer anything to add, but when there is no longer anything to take away...
<Carl Sagan> If you want to make a apple pie from scratch. You must first... invent the universe

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Attachment movement
« Reply #2 on: January 22, 2009, 04:20:39 PM »

It shouldn't happen and the DropToFloor bug should be fixed now. What WME version are you using?
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Baron

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 37
    • View Profile
    • Portfolio
Re: Attachment movement
« Reply #3 on: January 22, 2009, 06:22:13 PM »

Thanks jyujinnkai, I've got that workaround just about working now.

to Mnemonic
I'm using version 1.8.0006
I'm not sure what is making the attachment behave strangely. But I'm just a beginner so I imagine I've done something strange.
The "camera" actor doesn't have any bones in it, maybe that has an effect?
Thanks for the advice.

Spellbreaker

  • Supporter
  • Frequent poster
  • *
  • Karma: 4
  • Offline Offline
  • Gender: Male
  • Posts: 376
    • View Profile
    • Apeiron Studios
Re: Attachment movement
« Reply #4 on: January 22, 2009, 06:51:54 PM »

You should upgrade your WME INstallation, actual Version is 1.8.9
Logged

Baron

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 37
    • View Profile
    • Portfolio
Re: Attachment movement
« Reply #5 on: January 23, 2009, 06:41:28 AM »

Alright will do. I didn't realise there had been a new version. Cheers.

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Attachment movement
« Reply #6 on: January 23, 2009, 08:56:17 AM »

Well 1.8.9 is beta version, so people only should upgrade if they want :) But you can try.
Also it would be interesting to test if you get the same results using the teapot item from wme demo.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Jyujinkai

  • Global Moderator
  • Frequent poster
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 352
    • View Profile
    • Jyujinkai's WME Development Blog
Re: Attachment movement
« Reply #7 on: January 23, 2009, 10:51:21 AM »

yea, there may be something weird going on with your pivot or your xrefs... make sure the camera is 0,0,0  and pivot is 0,0,0 and that the vertex's aer zeroed out... then try it.
Logged
<Antoine de Saint-Exupéry> In any thing at all, perfection is finally attained not when there is no longer anything to add, but when there is no longer anything to take away...
<Carl Sagan> If you want to make a apple pie from scratch. You must first... invent the universe
 

Page created in 0.061 seconds with 22 queries.