Dynamically creating a KBSJoint chain

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

Dryn

New Member
Feb 20, 2003
128
0
0
Visit site
I had a nifty idea involving a dynamically generated chain of karma actors (my special types, not KActors) connected with double sided KBSJoints. Basically, a dynamic rope / chain created on runtime, instead of setup in ued (to which I add the system works and looks great). However, the dynamic version isn't working; If I do not apply karma physics to the joint, the jointactors spawn, appear, and hange there (have bHidden = false on my joint class, which is basically a raw subclass of KBSJoint with bNoDelete=False) but do nothing. If I DO apply physics, the joint actors are not visible, but all the links In my chain appear bound to the origin; meaning the chain collapses and they are all hanging from the same point. I have tried setting the KPos 1 & 2 vars, but any data in these only makes it so the chain links vanissh upon karma initialisation.

I would assume its possible to dynamically connect karma pieces (Bulldog, and the fact that my links DO bind, if to the wrong point in space) but I'm interested to know if it requires native coding in order for what I want to truely happen, as the bulldog joint _is_ a native enhanced class. (I tried using one of these jonits to test, but I get a GP fault).

Thanks in advance; If anyone can give me a pointer in the right direction I'll post the source up here. (Looks great ingame, but its anoying to create manually in ued)
 

Dryn

New Member
Feb 20, 2003
128
0
0
Visit site
hmmm

You might be on to something there, though from what I can see karma is off for the joints until its woken by an impulse (ie I peg it with a rocket) or if I give the kparams of the links the KStartEnabled a true value... If I call KWake(), I get the same result as the two above. Could it be perhaps karma is -sort of- on for the base initialisation, and this is causing the error? Also, I thought karma was updated 'next tick'; ie I can make and edit any number of elements, but the karma doesn't really kick in until the next frame... could anyone tell me if this presumtion is totally out to lunch?

(current system right now, in one function, has such a flow:

Make joint; bind to endpoint.
Make link; bind to joint.
Make new joint, bind to link.
Make new link; bind to new joint.
....
until endpoint or X segments are reached.)
 

[SAS]Solid Snake

New Member
Jun 7, 2002
2,633
0
0
40
New Zealand
www.digitalconfectioners.com
From what I know about Karma is that it is implemented alright, but incrediably slow. My new game type which uses a lot of karma actors run incrediably slow. It's insane... not sure how to make it any fast other than reduces the values it needs to calculate...
 

Mr Evi1

New Member
Mar 22, 2002
336
0
0
UK
come.to
[SAS]Solid Snake said:
From what I know about Karma is that it is implemented alright, but incrediably slow. My new game type which uses a lot of karma actors run incrediably slow. It's insane... not sure how to make it any fast other than reduces the values it needs to calculate...
I have found that the one thing that makes Karma run slowly more than anything else, is multiple Karma actors touching. If you can ensure that no two Karma actors are touching whilst they have Karma switched on, then the speed increases dramatically.
 

Dryn

New Member
Feb 20, 2003
128
0
0
Visit site
Slow!?

First, my rig is decent in the cpu power area (2ghz) but is not anywhere near top of the line, nor is it an unreasonable minnimum for the basic target when we release.

That said, I have about 80 karma actors, with a neglegable slowdown... collision is there, indeed a STACK of barrels, and it looks wicked. And the only hit is when you have say, my bug where a barrel accidently spawned 7 versions of the base barrel inside itself (same model, different skin) and looked like it was giving birth as the karma objects seperated... so unless you have karma INSIDE other karma, or use multiple convex collision objects, etc, there is no reason you can't use it like physics is used in say, Zelda... with less hit than turning 'detail textures' on....

Neways, karma is fine if you don't abuse it, but does anybody know about dynamically creating and using joints on runtime?
 

[SAS]Solid Snake

New Member
Jun 7, 2002
2,633
0
0
40
New Zealand
www.digitalconfectioners.com
Uhh, to my original post above about Karma slowness, that's probably why. I've got about 20-30 karma objects all stacked upon each other... but that's fine if it runs slow since speed isnt a factor in my mods. I have a AXP 2600+ FSB333Mhz, so I think my system is .. well OK. I am not sure how much gfx card plays a part of this...

Mmm I might experiment with joints and so forth and see what I can come up with.