ambiera logo

Ambiera Forum

Discussions, Help and Support.

folder icon Ambiera Forum > CopperCube > Programming and Scripting
forum topic indicator Is it possible to update collision data after modifying a mesh?
person icon
dekon_17
Registered User
Quote
2025-04-19 10:43:44

I tried to utilize my model loader so that it would load structures (buildings, ruins, etc.) into my game. While the visual part works just fine, the collision... Well, there's a little problem.

The collision data is a model, too. Except it is made invisible by making its vertex color 0x000000 (black) and setting material to 'trans_add'. It works well, the collision model is right where it should be. However, it doesn't have an updated... well, collision. Everything goes right through it. I tried using 'ccbUpdatePhysicsGeometry()', but my game has no physics, so, no dice.

Is there any other way to update collision data? The only possible way I see is to use default cubes for setting up collision, since changing the scale of the node does not break anything. I don't really want to use this method because, in my opinion, it will be a bit more tedious to set up. Like, I really don't want to make mod file structure more complicated than what I have right now:
House:
{
model: 'Assets/DefaultAssets/Generation/TestHouse.obj',
texture: 'Assets/DefaultAssets/Generation/TestHouse.png',
collision: 'Assets/DefaultAssets/Generation/TestHouseCol.obj',
navigation: [(15, 5, 15), (15, 5, -15), (-15, 5, 15), (-15, 5, -15)]
}


person icon
guest_Guest
Guest
Quote
2025-04-19 11:25:17

Try using custom binary or launcher by JIC, he has a function to turn on collision during runtime that regenerates the collision data. Maybe it can help yoi out.

person icon
dekon_17
Registered User
Quote
2025-04-19 17:31:25

Not sure about using someones binary file for now, I want to find a "vanilla" way to solve this first. In case it's not possible, then... I will think about that. I'm not comfortable with using someone elses binary files or entire code, not sure wether it's a good "mindset" though.

person icon
Monks
Guest
Quote
2025-04-19 18:38:14

Hi dekon 17, it's been a while, are you on coppercube discord channel

person icon
dekon_17
Registered User
Quote
2025-04-19 20:00:11

Nah, Monks, I don't use Discord now. Both because I don't interact much with anyone, and because Discord is blocked in our country (this can be avoided, but I'm not risking using some VPNs that may or may not steal data or whatever). Is there anything you wanted to ask, or...?

person icon
Monks
Guest
Quote
2025-04-20 13:53:15

Yes,i realised that you were making some cool shooting games, are you still making them?

person icon
dekon_17
Registered User
Quote
2025-04-20 16:00:30

Well... It's a long story.

You see, due to how complicated and uneven my first game was (Basic Shooter Game), I had to stop working on it. Due to lack of development experience and, more importantly, time, I had to stop working on it. It was no use trying to add something on a really, REALLY flawed foundation that I've made back in, like, 2021 or 2022. A lot had to be reworked, while at the same time I had to fight with the engine itself. You know, .fbx models were mirrored, animations would break, bad performance after spawning like 10 enemies, which forced me to spawn them in smaller groups. The list of problems, both on my part and on the engine's part, goes on and on. In the end, it was more like a lesson rather than a game. Though, I really want to return to working on it, I'm affraid that I'll waste a lot of time for nothing. Not sure...

I was also working on some other games back then, but not much progress was done and, in the end, I stopped working on them, too. That was back when I was working on BSG.

Now, I'm working on Untitled Game about Slaughtering Zombies. Somewhat of a joke game, but, as always, I've complicated the task for myself. I wanted to add modding support, both for easier implementation of game assets for me, and for others to modify the... "experience". So far, the progress is descent: guns & shooting, items, AI, inventory, upgradable stats, alcoholism & liver failure (in case alcohol stat is high enough, you start taking damage) - all the usual things for a game like that. Right now, I'm a bit stuck with the content loader part. That's why this thread was made, kind of.

Still, I HOPE that after finishing this part, I will be able to finish making this game faster.

person icon
Monks
Guest
Quote
2025-04-20 16:06:31

im glad you are working on a new game because frankly, i think you are a really good dev because till date i cant stop praising your weapons script(SWS), its so good

person icon
Monks
Guest
Quote
2025-04-20 16:32:46

some time ago you also posted a bsgai script in the forum, can we use it?

person icon
dekon_17
Registered User
Quote
2025-04-20 17:48:55

Oh, I'm not against their usage, at all. However, I am affraid they are quite poorly optimized and janky, since they were probably made a long time ago, back when I had considerably worse programming skills. So, while you may use them freely, I'm sure there are better free alternatives out there.

person icon
Monks
Guest
Quote
2025-04-20 18:57:57

Oh ok, but please post images of your current work for me to see, i'm very eager to see it, Also how can i use your AI script, should i create a folder containing all enemies,? Should i give them a specific name??

person icon
Monks
Guest
Quote
2025-04-21 11:04:16

??emoji icon_blink dekon

person icon
dekon_17
Registered User
Quote
2025-04-21 15:05:58

Yeah, well... Firstly, I doubt that I'll be posting much here in the first place. Though I thought about making somewhat of an announcment of UGaSZ, once the game is mostly done.

Secondly, about the AI, can you give me a link to the page where I posted it? I don't remember much about BSGAI, it's been a while after all. However, I do belive that I was making it in a rather proprietary way. So, it might be way too complicated to set up. I'd suggest to modify the code, but, knowing my programming from back then, I guess it's gonna be incredibly hard to understand in the first place.

person icon
Monks
Guest
Quote
2025-04-22 06:35:30

oh ok


Create reply:










 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


icon_holyicon_cryicon_devilicon_lookicon_grinicon_kissicon_monkeyicon_hmpf
icon_sadicon_happyicon_smileicon_uhicon_blink   






Copyright© Ambiera e.U. all rights reserved.
Contact | Imprint | Products | Privacy Policy | Terms and Conditions |