top of page

Scripting

Public·2 members

Julian Batory
Julian Batory

Hey rizzle, how would you take on full physics interactions and procedural animation?

Im talking about bone driven animation with colliders on meshes(or somewhere else idk) (model gathering info of forces going into it / blocking its path) and then possibly cross-breeding AnyPortrait animations with:

  • "full" ragdoll (rigidbodies?)

  • "soft" ragdoll where model gets lets say hit by something and gets partially afected, some type of animation deformation?

  • animation deformed by script?

  • animation generated from script? either as animation or just frame by frame repositioning of bones (so like external animator but with mesh deformation from anyPortrait for full procedural animation)

  • how would you bridge physical body model(made out of colliders lets say, and some joints logic to glue them?) with animation layer generated by anyPortrait? Generate body out of animation and then make animation follow the body to and vice versa depending on needs to be able to use both sides of the coin baked animations and physical interaction with 2D world? ;-;


60 Views
Julian Batory
Julian Batory
14 de mai.

haha :D thx im gonna figure it all out, for example ragdoll can be more efficiently done using unity physics and making animation skeleton follow physical model of the body with colliders on sockets (._.) and then only the matter of swapping between one into the other and vice versa. Youv made amazing tool btw

Does animation API work for Mechanim?

Hi.


I'm using Mechanim animations. I have tried to use animation API like this:


apPortrait p = GetComponent<apPotrtait>();
p.PauseLayer(1); // try to stop the animation in layer 1

but the animation in layer still runs.


Looks like the AnyPortrait animation API does not work when I use Mechanin. Am I right?


30 Views
RainyRizzle
RainyRizzle
14 de mai.

Hi!

AnyPortrait's animation functions only work when Mecanim is not used.

That's because it was implemented based on Unity's Legacy Animation system.


If you use Mecanim to control animations, you should call script functions of the "Animator" component, not apPortrait.


Please refer to the script manual for Unity's Animator to control animation.



If the problem is not resolved, please leave a comment again!

Thanks.

Animation and event script not working

I'm using unity 2020.3.23f1 and AnyPortrait 1.3.5. I've tried following the tutorial both on youtube and on the website, but it does not appear to trigger an event inside the animation, thus Debug.Log does not provide the console with a text. I always make sure to bake after using the 2d editor. Here is what I've done:




I hope you can help. Thank you!

54 Views
RainyRizzle
RainyRizzle
14 de mai.

We're glad the problem has been resolved.

And thanks to your report, we were able to find the problem of the website.

Thank you! :)


If you have any other needs or questions, please feel free to leave a post!

Have a nice day!

How to scale AnyPortrait gameobject according to camera aspect ratio?

Hello again,


I'd like to make game resolution compatible for all resolutions. And I need help for AnyPortrait gameobject. This is what I use at the moment:


ViewportHandler.cs added to Main Camera object (19 or 20 units size for the 1920x1080 reference resolution for me)


// Attach this script on your main ortohgraphic camera:

/* The MIT License (MIT)

Copyright (c) 2014, Marcel Căşvan

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,…


38 Views
DryreL
DryreL
14 de mai.

Thank you for the detailed reply. I'll check it out

Group Info

Discuss topics related to C# scripting.

© 2016-2025 by RainyRizzle Inc. Proudly created with Wix.com

bottom of page