generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: How to make Weld object based animations work?

Previous Thread :: Next Thread 
NVI is not online. NVI
Joined: 11 Jan 2009
Total Posts: 4744
02 Mar 2013 11:51 PM
Does anyone know how to do this? My problem is that the visual representation isn't updating - interestingly, the model bounding box is updating. My little falling tree animation is beautiful except for that fact.
Report Abuse
NVI is not online. NVI
Joined: 11 Jan 2009
Total Posts: 4744
02 Mar 2013 11:51 PM
Also, forgot to add:

top.Velocity = Vector3.new(1,1,1) * math.random(-1000,1000)

Does not work.
Report Abuse
awsumpwner27 is not online. awsumpwner27
Joined: 03 Sep 2011
Total Posts: 4389
03 Mar 2013 01:05 AM
The person who can answer this question will ascend to a higher plane of existence.
Report Abuse
8SunTzu8 is not online. 8SunTzu8
Joined: 30 Sep 2011
Total Posts: 8199
03 Mar 2013 06:24 AM
Just a guess, what if you created a new object for each position along the animation?

I don't know if it would solve the visual updating, but it might. I don't think it's very costly either, unless you're working with larger objects maybe.

Although, it might make no difference, since you need to weld the new object in the same fashion you did for the old one... I have a friend who did some animations, such as smoother crouching, but I don't know what method he used.

"Consider, friend, as you pass by, as you are now, so once was I. As I am now, you too shall be. Prepare, therefore, to follow me." -Scottish Tombstone Epitaph
Report Abuse
ArceusInator is not online. ArceusInator
Joined: 10 Oct 2009
Total Posts: 30553
03 Mar 2013 06:45 AM
Your bricks are anchored, causing roblox to think that they're "sleeping". While they're sleeping, they render in the same place even if they move. Solution is to only weld unanchored parts.
Report Abuse
8SunTzu8 is not online. 8SunTzu8
Joined: 30 Sep 2011
Total Posts: 8199
03 Mar 2013 06:46 AM
...

I would have assumed that people typically weld unanchored bricks, since there's no reason to weld unanchored bricks... Unless, perhaps, welding is more efficient than CFraming... :/

"Consider, friend, as you pass by, as you are now, so once was I. As I am now, you too shall be. Prepare, therefore, to follow me." -Scottish Tombstone Epitaph
Report Abuse
8SunTzu8 is not online. 8SunTzu8
Joined: 30 Sep 2011
Total Posts: 8199
03 Mar 2013 06:47 AM
*no reason to weld anchored bricks

silly me...
Report Abuse
Parthax is not online. Parthax
Joined: 27 Apr 2011
Total Posts: 6941
03 Mar 2013 06:48 AM
Continuing Arceus' post...
In that way, wouldn't it work if you unanhored the moving parts, set the weld CFrame, then anchored them again, all in an instant?


[Content Trolled]
Report Abuse
8SunTzu8 is not online. 8SunTzu8
Joined: 30 Sep 2011
Total Posts: 8199
03 Mar 2013 06:49 AM
Yeah, but then why not CFrame them?

"Consider, friend, as you pass by, as you are now, so once was I. As I am now, you too shall be. Prepare, therefore, to follow me." -Scottish Tombstone Epitaph
Report Abuse
ArceusInator is not online. ArceusInator
Joined: 10 Oct 2009
Total Posts: 30553
03 Mar 2013 06:57 AM
@parthax

I guess it would, but all those physics changes would quickly eat up your resources. Also it isn't necessary. You can just make a psuedo weld

function create_psuedoweld(part0, part1)
local weld ={
Name = "Weld",
Part1 = part1
Part0 = part0,
C1 = CFrame.new()
}

weld.Update = function()
weld.Part1.CFrame = weld.Part0.CFrame:toWorldSpace(weld.C1)
end

return weld
end


On a side note, does anyone know how C0 works if C1 is set to something? Both of those working together just isn't making sense to me.
Report Abuse
Brandonhare is not online. Brandonhare
Joined: 02 May 2007
Total Posts: 11005
03 Mar 2013 07:11 AM
Are you sure there are no anchored parts involved? Even automatic joints between the model and a baseplate can cause it to sleep.
Report Abuse
Radioaktiivinen is not online. Radioaktiivinen
Joined: 25 Apr 2009
Total Posts: 18629
03 Mar 2013 07:44 AM
You dont.

Even if you make it using body____ objects, and anchor when it doesnt move, itll still fail and teleport the object somewhere mid air where it was 5 minutes ago.
Report Abuse
NVI is not online. NVI
Joined: 11 Jan 2009
Total Posts: 4744
03 Mar 2013 03:22 PM
The point of using a weld object was to move an entire group of objects at once. But apparently that's not going to happen, so now I get to make an overcomplicated script to move each piece...
Report Abuse
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
04 Mar 2013 11:18 AM
guise guise
i need to explain somthing to you

welds are the poop of roblox
they are stinky and hard to work with
Report Abuse
MM233 is not online. MM233
Joined: 19 Jun 2008
Total Posts: 925
04 Mar 2013 11:32 AM
^ You really think so? Huh, I never got that impression.

Anyway, I draw from prior posts that your object is anchored then? I've run into this problem myself, and I seem to remember finding a solution. I just can't quite recall exactly how I did it. I'll look at my previous work to try and dig up my solution, but it may take me some time, as I currently don't have access to Studio.
Report Abuse
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
04 Mar 2013 12:38 PM
@mm
lol so tell me why you cant set the weld C0 and C1 in studio
its nuby
Report Abuse
MM233 is not online. MM233
Joined: 19 Jun 2008
Total Posts: 925
04 Mar 2013 01:50 PM
Because they are both CFrame values. Try setting a CFrame Value Object's value in Studio's Properties bar. Its the same situation. Remember, CFrames consist of 9 (?) numbers in a matrix, as opposed to, say, the 3 values of a Vector3. It's easier and less confusing to let a script set the CFrame Values (CFrame:fromEulerAnglesXYZ?), rather than trying to figure out 9 separate numbers to input on your own. Roblox has been saving you the effort, and you throw it in their face (*Cough*...joke there... *Cough*).
Report Abuse
woot3 is online. woot3
Joined: 10 Nov 2008
Total Posts: 3599
04 Mar 2013 02:19 PM
This is known as sleeping.
When a parts welds are changed, it doesn't render correctly until you wake it up by for instance, touching it.

There are certain things you can do, such as update another property of the part, which works for me, and I often find this glitch doesn't happen online.
Report Abuse
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
04 Mar 2013 02:47 PM
@MM
I don't understand why they cannot just have the nine values. Sure a script would be 'easier' but I think it's easier to just plug in values than to execute a script.
Report Abuse
MM233 is not online. MM233
Joined: 19 Jun 2008
Total Posts: 925
04 Mar 2013 05:16 PM
How are you going to find those values? That 9 part matrix isn't exactly the simplest thing to figure out. Sure, if you've spent the time to figure out the system, it'd be okay (I guess.).

But you know Roblox, they're always trying to make things easier for their users. Which isn't something I'm exactly for either. I simply took the side opposite yours because 1) you hadn't given any reasoning for your argument and I wanted to see what you'd say, and 2) I enjoy looking at details from as many different perspectives as possible.
Report Abuse
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
04 Mar 2013 09:49 PM
@MM
Good man.
Report Abuse
NVI is not online. NVI
Joined: 11 Jan 2009
Total Posts: 4744
04 Mar 2013 10:00 PM
@MM223

Matrices are stupidly easily. There's tons of other helper functions that most "advanced scripters" don't even seem to know about. CFrame:toWorldSpace/toObjectSpace are pretty helpful. I ended up making my animation without welds just by saving the CFrames of the attached pieces in the object space of the base moving piece, then each time I set the angle of the base moving piece, I just transformed those saved CFs to world space and used them.

If you don't understand matrices, it's not hard to learn. Beyond pure mathematics (where they're actually pretty boring), their application in 3D graphics is as straightforward and intuitive as it gets. They represent a rotation not by angles, but by unit vectors perpendicular to each other. You can scale with them by using non-unit vectors. You can also figure out the rotations using common sense and some basic knowledge of trigonometry.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image