Highlighted

Shape jumps on the y-offset

Community Beginner ,
Oct 15, 2018

Copy link to clipboard

Copied

Hi AE forums!

Earlier i've found out how to make a shape follow a text, thanks to these forums, so now I'll try again!

I'm in a situation where I only want the "dot" to follow the text on the x-offset and NOT on the y-offset. Because right now this is happening when I insert some characters or special characters:

dot_text.png

As you can see the "dot" is jumping under the horizontal line, which I don't want it to do. I want the dot to be exactly as in the "THIS IS A NORMAL TEXT", special characters or not.

Right now the expression I use looks like this:

x=thisComp.layer("SText").sourceRectAtTime(time,true).width/2 + thisComp.layer("SText").transform.position[0] + effect("x Offset")("Slider");

y=thisComp.layer("SText").sourceRectAtTime(time,true).height + thisComp.layer("SText").transform.position[1] + effect("y Offset")("Slider");

[x,y];

Right now it jumps a bit when inserting a "Q", more when inserting a "," and a lot when inserting a "Å", so I really hope someone have a fix for this, so I don't have to create 25 different templates.

One template would be fantastic, because creating a new template for every special character or letter that makes it jump would take ages and be very confusing for my co-workers when I later on will make an Essential Graphics Templates from this.

I'm very new at expressions... so many questions

Hope for help! Fingers crossed and thank you in advance!

Best regards,

Niklas

Most Valuable Participant
Correct answer by Mylenium | Most Valuable Participant

Simply replace y with a fixed value.

Mylenium

TOPICS
Expressions

Views

269

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Shape jumps on the y-offset

Community Beginner ,
Oct 15, 2018

Copy link to clipboard

Copied

Hi AE forums!

Earlier i've found out how to make a shape follow a text, thanks to these forums, so now I'll try again!

I'm in a situation where I only want the "dot" to follow the text on the x-offset and NOT on the y-offset. Because right now this is happening when I insert some characters or special characters:

dot_text.png

As you can see the "dot" is jumping under the horizontal line, which I don't want it to do. I want the dot to be exactly as in the "THIS IS A NORMAL TEXT", special characters or not.

Right now the expression I use looks like this:

x=thisComp.layer("SText").sourceRectAtTime(time,true).width/2 + thisComp.layer("SText").transform.position[0] + effect("x Offset")("Slider");

y=thisComp.layer("SText").sourceRectAtTime(time,true).height + thisComp.layer("SText").transform.position[1] + effect("y Offset")("Slider");

[x,y];

Right now it jumps a bit when inserting a "Q", more when inserting a "," and a lot when inserting a "Å", so I really hope someone have a fix for this, so I don't have to create 25 different templates.

One template would be fantastic, because creating a new template for every special character or letter that makes it jump would take ages and be very confusing for my co-workers when I later on will make an Essential Graphics Templates from this.

I'm very new at expressions... so many questions

Hope for help! Fingers crossed and thank you in advance!

Best regards,

Niklas

Most Valuable Participant
Correct answer by Mylenium | Most Valuable Participant

Simply replace y with a fixed value.

Mylenium

TOPICS
Expressions

Views

270

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Oct 15, 2018 0
Most Valuable Participant ,
Oct 15, 2018

Copy link to clipboard

Copied

Simply replace y with a fixed value.

Mylenium

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 15, 2018 0
Community Beginner ,
Oct 15, 2018

Copy link to clipboard

Copied

Hi Mylenium.

Thank you for the quick response!

Well that was easy. I did as you said. Seperated the values and only used the expression on X Position. So now the y is fixed.

Thank you a lot!

Best regards,

Niklas

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 15, 2018 0
New Here ,
Aug 11, 2020

Copy link to clipboard

Copied

Hi, Mylenium.

 

What would the end result be? I am a novice in expressions. Your answer would be helpful.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 11, 2020 0