Game Editing > General Content Creation

[Unity] Fantasy asset pack prefabs

<< < (2/6) > >>

ratty redemption:

although this wooden crate is not included in kat's fantasy set, it will hopefully be available in the future, along with other similar dynamic prefabs.

the first image shows the cracked parts of the crate still fitted together, which kat modeled in blender. as this was a test it's not the final version, but gives an indication of what is possible.

the various broken parts are held within a parent prefab. basically a unity empty which acts like an origin for the group of rigidbody objects. the yellow gizmos are my force points, as i call them. level designers will be able drag the tips of these around the 3d scene, in order to instruct my breakable script to apply an explosion like force in the direction of the tips.



the second image is half way through the crate exploding apart. the length of the yellow gizmos don't actually affect the amount of force (speed) of each child object, instead that variable can be set as a random range within my breakable script's inspector options.

the unity console window is also printing out the results of my object pool script. which is a type of manager script that recycles dynamic objects like bullets, breakable objects, collectibles etc.



i'm also experimenting with the amount of damage that my health script passes to the breakable script, possibly affecting the explosion force.

so in theory if the player jumped up and down on top of a dynamic crate, then it might just crack apart after it's health runs out. whereby if the player shot the crate with a rocket, or dropped down from a significant height, then the crate might explode.

ratty redemption:

i've been busy the last 3 months, mainly switching from monodevelop to visual studio for code writing. it took me while to learn and configure vs, as it's a lot more complicated than mono. i also made my own fonts and colors interface theme for it.

anyway, i'm back on track producing content again... this 1st image shows some test results of me getting gizmos cubes to rotate correctly, using a script that reads from the inspector's transform component. unfortunately this is not a feature built directly into unity's editor when it comes to gizmos, but it's very useful. especially when creating visual aids for prefab objects like spawn points. as seen in the 2nd image.



my script displays a single boolean checkbox in the inspector called "is character". if ticked it will adjust the scale and positions of some of the gizmos parts.



this script doesn't actually spawn anything. it's just the visual aid for the position and rotation that a spawner script would use.

i will be releasing all the scripting and prefabs i show here in the future, unless they are superseded or prove to be unstable.

kat:
Very nice.

ratty redemption:
thanks kat.

ratty redemption:

i'm getting on well with writing a script based trigger system, to replace the in built unity one. mine does use some of the unity functions like "Physics.OverlapBoxNonAlloc" but it doesn't use "OnTriggerEnter" etc.

it has optional features like matching trigger id to colliding object's id, combined mass of colliding objects for pressure pads etc and different update speeds.

the latter can help with performance, as the "slow" option only checks one trigger volume per frame, as opposed to "fast" which loops through all triggers every frame. there is also an "auto" update speed, which dynamically switches between the the other modes, depending on what is going on in the game.

it's a manager and data system. meaning the scripts attached to the empty game objects that turn them into triggers are relatively small, as they contain very little, if any logic, and no update functions. the logic and updates are processed in the manager, after it has found and populated a list of triggers at start up. i'm also writing a series of other managers to handle different aspects of the gameplay.

below are some screencaps of this work in progress. note the verbose debug logging in the 3rd image is not displayed by default, it's just an option that level designers can toggle in the unity inspector, mainly for the purpose of tracking what the triggers are doing, if needed.

although it looks complicated, the end result should be straight forward for most level designers, as it's based on drag and drop and check box interface design. in theory it should only take a few minutes to set up, once someone follows the step by step instructions, that myself or kat will write in the future.





Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version