May 23, 2012, 01:18:27 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Please report any bugs or issues that you might be encountering with the Beta in the Support System so that we can better keep track of any oustanding issues that may come up.

GameCore Support System
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Winch  (Read 695 times)
BigDaz
Sr. Member
****
Posts: 345


HardCore


View Profile
« on: May 22, 2009, 06:55:03 AM »

Is it posible to create a winch?
I can create a chain or rope using pieces linked together but I can't think of a way to extend and retract it.
Logged
sihingdj
Newbie
*
Posts: 8


View Profile
« Reply #1 on: May 22, 2009, 07:39:07 PM »

I'm just a 3d artist with 0 scripting, programming skills, but I was also looking for an example of winch like function for a castle drawbridge open/close. I'm handling it with animation in maya but not sure how it will work in gamecore yet...

-DJ
Logged
Squat
Hero Member
*****
Posts: 592


View Profile
« Reply #2 on: May 22, 2009, 08:00:12 PM »

My approach would be to include invisible marker objects for the connection points to the line. You can then write a script to draw a trail between those two objects and then use a chain-link texture to make it look right. This is similar to how a grapply hook works aswell as something specific like the smoker's tongue in Left4Dead that can drag you. It's clearly raycasting straight at you and then as soon as something breaks that connection line between you, it raycasts to that point from the source and then from that point to you and makes two lines...each time it's broken by an obstruction between the view, it breaks it and redraws from that spot so it's effectively appearing to bend around obstacles.

Now if you wanted big ass beefy chains on a drawbridge, my suggestion would be to hand animate the entire open/close sequence. One big tip is to try and only animate one link's entire motion until it gets to the next link's exact spot, so you can repeat it with less frames and also bring the top link back down to the start of the chain as it passes into some kind of hole in the wall. Think of a conveyor belt with a box that comes out from a hole and then disappears into another hole and how an animation would want to loop during that sequence. You can't have 50,000,000 boxes, and it's a waste when you can maybe only see 10 at one time until it's gone into the hole. You could go really far and use a nice spline to direct the links that's animated with some bounce to it while the links are path restricted to it as they convey up into the hole and disappear inside the wall geometry.
« Last Edit: May 22, 2009, 08:02:02 PM by Squat » Logged
sihingdj
Newbie
*
Posts: 8


View Profile
« Reply #3 on: May 25, 2009, 07:02:47 AM »

Ya, I'm animating the chains and cullis gate in maya with some nice bouncy lattice deformers, but that doesnt translate to GC. I recently had the good fortune to get a genious young programming cousin of mine interested in gamecore, so I'm putting my faith in him to help out on these game logic problems that fly way over my modest art boi head.

Thanks for the input though Squat, I have been silently following this forum for some years now, and you and some other key people here have played a big part in keeping me interested in this engine.

Logged
BigDaz
Sr. Member
****
Posts: 345


HardCore


View Profile
« Reply #4 on: May 25, 2009, 08:39:58 AM »

To do a drawbridge with physics would be fairly easy as long as the wall is tall and thick enough to hide the chain, the length of it wouldn't need to change. The chain would only have to look like a chain, in physics terms it could be a solid box if the chain is always taught. The drawbridge and chains would all 3 boxes joined by 2 hinges.



I suspect might be easier to have the drawbridge rotate and push the chain up, rather than the chains pulling too. But it depends a bit on how realistic it needs to be. That's the way I'd probably do it anyway.
Logged
Pages: [1]
  Print  
 
Jump to:  

 
Powered by MySQL Powered by PHP bluBlur Skin © 2006, hbSkins
Powered by SMF 1.1.14 | SMF © 2006-2011, Simple Machines LLC
Valid XHTML 1.0! Valid CSS!