Mesh importing/change of origin needed?

Discussions about Coding and Scripting
Post Reply
JackGriffin
Godlike
Posts: 3774
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Mesh importing/change of origin needed?

Post by JackGriffin »

I'm having a bit of a problem. I have a mesh I've imported but the collision cylinder is way off:
nadecylinder.jpg
nadecylinder.jpg (83.77 KiB) Viewed 1637 times
How do I adjust that in the import lines so that it is corrected? I've tried several things but it doesn't change the collision placement.
So long, and thanks for all the fish
User avatar
Shadow
Masterful
Posts: 743
Joined: Tue Jan 29, 2008 12:00 am
Personal rank: Mad Carpenter
Location: Germany
Contact:

Re: Mesh importing/change of origin needed?

Post by Shadow »

SO und zwar is das sow..

Well you simply have to add the command "#exec MESH ORIGIN MESH=WoodenBoxM X=? Y=? Z=?" the way you want it to be correctly positioned
Image
JackGriffin
Godlike
Posts: 3774
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: Mesh importing/change of origin needed?

Post by JackGriffin »

I did try this, but no value brought a difference. Here's the line:

Code: Select all

#exec MESH ORIGIN MESH=PapricaAmmoM X=0 Y=0 Z=0 YAW=0
and I've tried any number of different values:

Code: Select all

#exec MESH ORIGIN MESH=PapricaAmmoM X=50 Y=50 Z=50 YAW=0
and it makes no difference when I open editor back up.

EDIT: nvm...You are very correct. I was just using values way too small to see an effect. It's fixed and thank you!
So long, and thanks for all the fish
User avatar
EvilGrins
Godlike
Posts: 9769
Joined: Thu Jun 30, 2011 8:12 pm
Personal rank: God of Fudge
Location: Palo Alto, CA
Contact:

Re: Mesh importing/change of origin needed?

Post by EvilGrins »

As always, limited editing skills here. Still, have you tried clicking on the cylinder with the mouse while holding down the CTRL key and simply moving it to where you want it?

Probably have already.
http://unreal-games.livejournal.com/
Image
medor wrote:Replace Skaarj with EvilGrins :mrgreen:
Smilies · viewtopic.php?f=8&t=13758
JackGriffin
Godlike
Posts: 3774
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: Mesh importing/change of origin needed?

Post by JackGriffin »

The short answer is you can't.
The long answer is that all collision cylinders have an 'origin' or center from which the cylinder is calculated. That origin isn't necessarily in the center of your mesh, it can be off to the side and below/above which will cause the collision cylinder to create itself there. If you look again at the ed pic you'll see what I mean. Once I adjusted the origin it's now centered.
So long, and thanks for all the fish
Post Reply